Changeset 13735 in genesis


Ignore:
Timestamp:
Jan 18, 2017, 10:47:59 PM (8 years ago)
Author:
rick
Message:

autogen_ifname is ambigious since introduction of vlans.

dhcpd grouping should not group vlans since they are seperate interfaces (as
DHCP is concerned), where-as normal aliases should be grouped.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13734 r13735  
    533533  for iface_key in get_interface_keys(datadump):
    534534    ifname = datadump[iface_key]['autogen_ifbase']
     535    groupif = ifname if not datadump[iface_key]['autogen_vlan'] else iface_key
    535536    if not datadump[iface_key].has_key('comment'):
    536537      datadump[iface_key]['comment'] = None
     
    539540      continue
    540541
    541     dhcp_out[iface_key].append("## %(autogen_iface)s - %(comment)s\n" % datadump[iface_key])
     542    dhcp_out[groupif].append("## %(autogen_iface)s - %(comment)s\n" % datadump[iface_key])
    542543
    543544    (addr, mask) = datadump[iface_key]['ip'].split('/')
     
    547548
    548549    if dhcp_type(datadump[iface_key]) != DHCP_SERVER:
    549       dhcp_out[ifname].append(textwrap.dedent("""\
     550      dhcp_out[groupif].append(textwrap.dedent("""\
    550551        subnet %(autogen_subnet)s netmask %(autogen_netmask)s {
    551552          ### not autoritive
     
    563564      fixed = 5
    564565      for mac in datadump['no_portal']:
    565         dhcp_out[ifname].append(textwrap.dedent("""\
     566        dhcp_out[groupif].append(textwrap.dedent("""\
    566567            host fixed-%(ifname)s-%(fixed)s {
    567568              hardware ethernet %(mac)s;
     
    571572      fixed += 1
    572573
    573     dhcp_out[ifname].append(textwrap.dedent("""\
     574    dhcp_out[groupif].append(textwrap.dedent("""\
    574575      subnet %(autogen_subnet)s netmask %(autogen_netmask)s {
    575576        range %(autogen_dhcp_start)s %(autogen_dhcp_stop)s;
Note: See TracChangeset for help on using the changeset viewer.