Skip to content

Commit 010e920

Browse files
committed
Send DHCPv4 vendor identifier
1 parent aa9a72d commit 010e920

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net-dhcp/udhcpc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
HANDLER_SCRIPT = path.join(path.dirname(__file__), 'udhcpc_handler.py')
1616
AWAIT_INTERVAL = 0.1
17+
VENDOR_ID = 'docker'
1718

1819
class EventType(Enum):
1920
BOUND = 'bound'
@@ -46,6 +47,8 @@ def __init__(self, iface, v6=False, once=False, event_listener=None):
4647
bin_path = '/usr/bin/udhcpc6' if v6 else '/sbin/udhcpc'
4748
cmdline = [bin_path, '-s', HANDLER_SCRIPT, '-i', iface['ifname'], '-f']
4849
cmdline.append('-q' if once else '-R')
50+
if not v6:
51+
cmdline += ['-V', VENDOR_ID]
4952

5053
self._suffix = '6' if v6 else ''
5154
self._event_queue = posix_ipc.MessageQueue(f'/udhcpc{self._suffix}_{iface["address"].replace(":", "_")}', \

0 commit comments

Comments
 (0)