The creation of a VLAN netdev device, as seen in the 'ip link' command, is done without specifying a mac address. The kernel determines the mac address for the VLAN NETDEV, which should be the parent mac address.
This patch fixes this behavior and the resulting delivery of DHCP Offers to the VLAN NETDEV. Technical Contributors Rami Rosen <rami.ro...@intel.com> Szczerbik, PrzemyslawX <przemyslawx.szczer...@intel.com> Signed-off-by: David O Neill <david.m.one...@intel.com> --- src/network/networkd-netdev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c index 6949b40..2c1dd9e 100644 --- a/src/network/networkd-netdev.c +++ b/src/network/networkd-netdev.c @@ -647,9 +647,14 @@ static int netdev_load_one(Manager *manager, const char *filename) { return log_oom(); if (!netdev->mac) { - r = netdev_get_mac(netdev->ifname, &netdev->mac); - if (r < 0) - return log_error_errno(r, "Failed to generate predictable MAC address for %s: %m", netdev->ifname); + /* do not generate mac for VLAN netdev, allow kernel to assign mac (parent mac) */ + if(netdev->kind != NETDEV_KIND_VLAN) { + r = netdev_get_mac(netdev->ifname, &netdev->mac); + if (r < 0) + return log_error_errno(r, "Failed to generate predictable MAC address for %s: %m", netdev->ifname); + } else { + log_debug_netdev(netdev, "Skipping generating MAC address for vlan netdev"); + } } r = hashmap_put(netdev->manager->netdevs, netdev->ifname, netdev); -- 1.8.2
smime.p7s
Description: S/MIME cryptographic signature
-------------------------------------------------------------- Intel Shannon Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 Business address: Dromore House, East Park, Shannon, Co. Clare This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel