]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: fix ipv6 tunnel encapsulation limit (#19087)
authorhide <33016470+hdfln@users.noreply.github.com>
Tue, 23 Mar 2021 16:05:25 +0000 (01:05 +0900)
committerGitHub <noreply@github.com>
Tue, 23 Mar 2021 16:05:25 +0000 (01:05 +0900)
The encapsulation limit of IPv6 tunnel can not be set to 4, which is the default value of the encapsulation limit.

src/network/netdev/tunnel.c

index 2fab269397f5ab121ef6fd7b2b425a9da63cb50a..23718081b90bc5c513fae83c6afd44061ec3243a 100644 (file)
@@ -389,7 +389,7 @@ static int netdev_ip6tnl_fill_message_create(NetDev *netdev, Link *link, sd_netl
         if (t->allow_localremote >= 0)
                 SET_FLAG(t->flags, IP6_TNL_F_ALLOW_LOCAL_REMOTE, t->allow_localremote);
 
-        if (t->encap_limit != IPV6_DEFAULT_TNL_ENCAP_LIMIT) {
+        if (t->encap_limit != 0) {
                 r = sd_netlink_message_append_u8(m, IFLA_IPTUN_ENCAP_LIMIT, t->encap_limit);
                 if (r < 0)
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPTUN_ENCAP_LIMIT attribute: %m");