Re: [PATCH 2/2] ipvlan: always allow the broadcast MAC address
From: Jiri Benc <hidden>
Date: 2015-03-27 17:46:33
On Thu, 26 Mar 2015 17:43:42 -0500, Dan Williams wrote:
ipvlan currently fails DHCP addressing for two reasons: 1) DHCP offers are typically unicast back to the device's MAC address, and at the IP layer have a destination IP address matching the new lease address. In ipvlan unicast packets are checked against existing addresses assigned to the ipvlan interface, so clearly this fails hard because the ipvlan interface has no IP addresses yet. Workaround: request that the server broadcast replies (-B for dhclient), which don't get checked against the IP address list. 2) Even when that's done, mac_filters only allows the broadcast MAC address when the interface has >= 1 IPv4 addresses, so double-fail, and the incoming DHCP offer gets dropped on the floor again. Instead of doing ugly stuff like watching for outgoing DHCP requests and adding the broadcast MAC to mac_filters for a period of time, just always allow the broadcast MAC. This lets the ipvlan interface be configured with DHCP in Layer2 mode as long as as broadcast replies are used. Signed-off-by: Dan Williams <redacted>
I don't see any better option, either. Reviewed-by: Jiri Benc <redacted> -- Jiri Benc