From 49b8e12a01466a483f519446cc100fdf29549957 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 9 Mar 2020 15:05:19 -0400 Subject: [PATCH] Update TODO We have now done IP_PKTINFO, but there is a potential TODO if wanting to properly honor unicast request. For now, will just do always-broadcast as the options to do unicast are more complex to do (either construct the packets or inject neigh entry manually) --- confluent_server/confluent/discovery/protocols/pxe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index e17ce0d4..44bee8b2 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -183,8 +183,8 @@ def ipfromint(numb): def snoop(handler, protocol=None): #TODO(jjohnson2): ipv6 socket and multicast for DHCPv6, should that be #prominent - #TODO(jjohnson2): IP_PKTINFO, recvmsg to get the destination ip, per - #proxydhcp.c from xCAT + #TODO(jjohnson2): enable unicast replies. This would suggest either + # injection into the neigh table before OFFER or using SOCK_RAW. net4 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) net4.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) net4.setsockopt(socket.IPPROTO_IP, IP_PKTINFO, 1)