diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-31 04:54:21 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-31 05:10:28 +0100 |
commit | f4ef1c196c6133a4048eb12766eb0822274e69a2 (patch) | |
tree | 36b65920fa0aaec280c4afb4d33587c9cac30c90 /src/network/networkd-ndisc.c | |
parent | network: configure NDisc after MAC address is assigned (diff) | |
download | systemd-f4ef1c196c6133a4048eb12766eb0822274e69a2.tar.xz systemd-f4ef1c196c6133a4048eb12766eb0822274e69a2.zip |
network: disable NDisc for CAN interfaces
We already disabled DHCP clients for CAN interfaces.
Diffstat (limited to '')
-rw-r--r-- | src/network/networkd-ndisc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 4193b51093..06c4366b70 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -6,6 +6,7 @@ #include <arpa/inet.h> #include <netinet/icmp6.h> #include <linux/if.h> +#include <linux/if_arp.h> #include "sd-ndisc.h" @@ -34,6 +35,9 @@ bool link_ipv6_accept_ra_enabled(Link *link) { if (link->flags & IFF_LOOPBACK) return false; + if (link->iftype == ARPHRD_CAN) + return false; + if (link->hw_addr.length != ETH_ALEN && !streq_ptr(link->kind, "wwan")) /* Currently, only interfaces whose MAC address length is ETH_ALEN are supported. * Note, wwan interfaces may be assigned MAC address slightly later. |