diff --git a/src/hostinfo/dhcpd.py b/src/hostinfo/dhcpd.py index 13f48e639beb68a362ecbe2e638d05f24aa7d1bb..04385fb9553a4caf7421a3795647ffb431162ee4 100755 --- a/src/hostinfo/dhcpd.py +++ b/src/hostinfo/dhcpd.py @@ -267,8 +267,6 @@ def emit_hosts(tree, options, networks, pxeboot=False): for ethernet in util.ethernets(ip.ethernet[0:]): if pxeboot == 'only' and not bool(ip._pxeboot_): continue - if ethernet.lower() != ethernet: - raise util.HostinfoException('%s not lower-case' % ethernet) if ip.never[0]: if match(util.address(ip.never[0])): if not ethernet in never: diff --git a/src/hostinfo/dhcpd_ipv6.py b/src/hostinfo/dhcpd_ipv6.py index 98b7f35c4f2f8537be6ecce5b29256e7f5bc3d1a..ad2a5ffb90243faa9c61e4abdab73bb7cd55d614 100755 --- a/src/hostinfo/dhcpd_ipv6.py +++ b/src/hostinfo/dhcpd_ipv6.py @@ -174,8 +174,6 @@ def emit_hosts(tree, options, networks): for ip in tree._host_._interface_._ipv6_: # Find all hosts that associated with this network for ethernet in util.ethernets(ip.ethernet[0:]): - if ethernet.lower() != ethernet: - raise util.HostinfoException('%s not lower-case' % ethernet) if ip.never[0]: if match(util.address(ip.never[0])): if not ethernet in never: diff --git a/src/hostinfo/util.py b/src/hostinfo/util.py index 4272c04e179501533d8b0bb0a258820ed0a8418b..54f6f8318f922aa5430544cd494e766fa2d069fb 100755 --- a/src/hostinfo/util.py +++ b/src/hostinfo/util.py @@ -2,6 +2,7 @@ import ipaddr import itertools import types import hostinfo.parser +import re def network(s): if s.network[0] and s.netmask[0]: @@ -32,7 +33,9 @@ def subnet(tree, addr): def ethernets(ether): if ether == None: return [] - return ether.split(',') + if ether.lower() != ether: + raise HostinfoException('%s not lower-case' % ether) + return re.split('[^:0-9a-fA-F]+', ether) def aton(addr): result = long(0)