chiark / gitweb /
networkd: add Patch of MTU discovery for IPIP and GRE
authorSusant Sahani <susant@redhat.com>
Tue, 22 Jul 2014 11:21:53 +0000 (16:51 +0530)
committerSusant Sahani <susant@redhat.com>
Wed, 29 Oct 2014 05:24:01 +0000 (10:54 +0530)
Add path of MTU disovery for IPIP and GRE Kind of tunnels

src/network/networkd-netdev-tunnel.c

index 7587696..e5981a4 100644 (file)
@@ -75,6 +75,14 @@ static int netdev_ipip_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
                 return r;
         }
 
+        r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_PMTUDISC, t->pmtudisc);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_IPTUN_PMTUDISC attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
         return r;
 }
 
@@ -181,6 +189,14 @@ static int netdev_gre_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_me
                 return r;
         }
 
+        r = sd_rtnl_message_append_u8(m, IFLA_GRE_PMTUDISC, t->pmtudisc);
+        if (r < 0) {
+                log_error_netdev(netdev,
+                                 "Could not append IFLA_GRE_PMTUDISC attribute: %s",
+                                 strerror(-r));
+                return r;
+        }
+
         return r;
 }