Lines 21-29
for key, value in configRegistry.items():
|
Link Here
|
---|
|
21 |
hosts = configRegistry.get(key, default_hosts) |
21 |
hosts = configRegistry.get(key, default_hosts) |
22 |
if hosts: |
22 |
if hosts: |
23 |
if iface == primary: |
23 |
if iface == primary: |
24 |
primary_entries.append((iface, None, '%s\t%s' % (value, hosts))) |
24 |
primary_entries.append((iface, 4, '', '%s\t%s' % (value, hosts))) |
25 |
else: |
25 |
else: |
26 |
entries.append((iface, None, '%s\t%s' % (value, hosts))) |
26 |
entries.append((iface, 4, '', '%s\t%s' % (value, hosts))) |
27 |
match = RE_IPV6.match(key) |
27 |
match = RE_IPV6.match(key) |
28 |
if match: |
28 |
if match: |
29 |
(iface, name) = match.groups() |
29 |
(iface, name) = match.groups() |
Lines 33-43
for key, value in configRegistry.items():
|
Link Here
|
---|
|
33 |
if name == 'default': |
33 |
if name == 'default': |
34 |
name = '' |
34 |
name = '' |
35 |
if iface == primary: |
35 |
if iface == primary: |
36 |
primary_entries.append((iface, name, '%s\t%s' % (value, hosts))) |
36 |
primary_entries.append((iface, 6, name, '%s\t%s' % (value, hosts))) |
37 |
else: |
37 |
else: |
38 |
entries.append((iface, name, '%s\t%s' % (value, hosts))) |
38 |
entries.append((iface, 6, name, '%s\t%s' % (value, hosts))) |
39 |
for (iface, name, line) in sorted(primary_entries): # IPv4 < IPv6.default < IPv6.* |
39 |
for (iface, ip_version, name, line) in sorted(primary_entries): # IPv4 < IPv6.default < IPv6.* |
40 |
print(line) |
40 |
print(line) |
41 |
for (iface, name, line) in sorted(entries): # IPv4 < IPv6.default < IPv6.* |
41 |
for (iface, ip_version, name, line) in sorted(entries): # IPv4 < IPv6.default < IPv6.* |
42 |
print(line) |
42 |
print(line) |
43 |
@!@ |
43 |
@!@ |