diff options
author | Susant Sahani <susant@redhat.com> | 2014-05-22 11:59:19 +0530 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-06-02 16:16:02 +0200 |
commit | a9f434cf00d1d36d9a013b9739efe69653dd7279 (patch) | |
tree | 9b420807b78cac20ef55398cb95105a63ec698de /src/network/networkd-tunnel.c | |
parent | 8bb088c5d44e566eb101e3f093d690aeb2a82285 (diff) |
networkd: sit-tunnel add support for pmtudisc
This patch adds path of mtu discovery for sit tunnel.
To enable/disable DiscoverPathMTU is introduced.
Example configuration
file: sit.netdev
[NetDev]
Name=sit-tun
Kind=sit
MTUBytes=1480
[Tunnel]
DiscoverPathMTU=1
Local=X.X.X.X
Remote=X.X.X.X
By default pmtudisc is turned on , if DiscoverPathMTU
is missing from the config. To turn it off
DiscoverPathMTU=0 needs to be set.
Diffstat (limited to 'src/network/networkd-tunnel.c')
-rw-r--r-- | src/network/networkd-tunnel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/networkd-tunnel.c b/src/network/networkd-tunnel.c index 9b4cb4f959..1a06a17c7b 100644 --- a/src/network/networkd-tunnel.c +++ b/src/network/networkd-tunnel.c @@ -207,6 +207,14 @@ static int netdev_fill_sit_rtnl_message(Link *link, sd_rtnl_message *m) { return r; } + r = sd_rtnl_message_append_u8(m, IFLA_IPTUN_PMTUDISC, netdev->tunnel_pmtudisc); + if (r < 0) { + log_error_netdev(netdev, + "Could not append IFLA_IPTUN_PMTUDISC attribute: %s", + strerror(-r)); + return r; + } + r = sd_rtnl_message_close_container(m); if (r < 0) { log_error_netdev(netdev, |