]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: sd-ipv4ll and sd-ipv4acd only support ethernet interfaces
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 9 Dec 2021 07:38:02 +0000 (16:38 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 9 Dec 2021 14:04:43 +0000 (15:04 +0100)
The deny list in link_ipv4ll_enabled() are mostly non-ethernet type,
whose link->iftype are not ARPHRD_ETHER, e.g. ARPHRD_NONE for bareudp,
ARPHRD_WIREGURAD for wireguard, ARPHRD_GRE for gre, and so on.

Only the exception is vrf, which is ARPHRD_ETHER, but seems not to
support ARP.

src/network/networkd-link.c

index 956e2984bc85a1e4e3aa638262ade48a9dee88e2..7bc391d68d80c88a1bd9d457dd97f60d62f7d7ae 100644 (file)
@@ -87,9 +87,12 @@ bool link_ipv4ll_enabled(Link *link) {
         if (ether_addr_is_null(&link->hw_addr.ether))
                 return false;
 
-        if (STRPTR_IN_SET(link->kind,
-                          "vrf", "wireguard", "ipip", "gre", "ip6gre","ip6tnl", "sit", "vti",
-                          "vti6", "nlmon", "xfrm", "bareudp"))
+        /* ARPHRD_INFINIBAND seems to potentially support IPv4LL.
+         * But currently sd-ipv4ll and sd-ipv4acd only support ARPHRD_ETHER. */
+        if (link->iftype != ARPHRD_ETHER)
+                return false;
+
+        if (streq_ptr(link->kind, "vrf"))
                 return false;
 
         /* L3 or L3S mode do not support ARP. */