]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
Linux: use broadcast flag with ipvlan interfaces by default.
authorIdo Rosen <ido@kernel.org>
Fri, 23 Apr 2021 09:34:34 +0000 (05:34 -0400)
committerIdo Rosen <ido@kernel.org>
Sun, 25 Apr 2021 10:02:53 +0000 (06:02 -0400)
commit3069dce934d36aac0c7d43c09e51feaf5bb0b96f
treef8155b4dce4881ae956f7b08304fde3c1bd12198
parent01748b315d7093f458b9379bc77f19762c721314
Linux: use broadcast flag with ipvlan interfaces by default.

Linux ipvlan interfaces share a MAC address with their siblings and
parent physical interface.  Before they are assigned an IP address,
these virtual interfaces do not receive DHCP OFFER unicast messages
because the ipvlan driver does not know to pass them to the virtual
interface yet by IP.  This chicken-and-egg problem is resolved with
two changes:

In this patch, we set the broadcast flag for an interface if it
belongs to the ipvlan driver, as detected via SIOCETHTOOL ETHTOOL_GDRVINFO.
(closes #32)

A forthcoming patch will automatically modify the DHCP IAID for
ipvlan interfaces so that they do not conflict with the parent
(lower/physical) interface IAID.  For now, dhcpcd will display a warning
log message when conflicting IAID (same MAC address) interfaces are active.

(A minor grammar correction is included free of charge.)
src/common.h
src/dhcpcd.8.in
src/dhcpcd.c
src/if-linux.c