summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@users.noreply.github.com>2016-04-21 06:04:13 +0530
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:12:58 +0200
commit16e5706e47f52cc8da7515eb656cbef8ebfccc26 (patch)
treeff5d9d77f0e06af0839ce74ab12adcadf88ca2c1 /src
parent99d43b8fa4059271600d7b86e55224ce4309430d (diff)
networkd: bump MTU to 1280 for interfaces which have IPv6 enabled (#3077)
IPv6 protocol requires a minimum MTU of 1280 bytes on the interface. This fixes #3046. Introduce helper link_ipv6_enabled() to figure out whether IPV6 is enabled. Introduce network_has_static_ipv6_addresses() to find out if any static ipv6 address configured. If IPv6 is not configured on any interface that is SLAAC, DHCPv6 and static IPv6 addresses not configured, then IPv6 will be automatically disabled for that interface, that is we write "1" to /proc/sys/net/ipv6/conf//disable_ipv6.
Diffstat (limited to 'src')
-rw-r--r--src/basic/missing.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/missing.h b/src/basic/missing.h
index f50ba9470..0175747f8 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -959,6 +959,10 @@ static inline int setns(int fd, int nstype) {
#define IPV6_UNICAST_IF 76
#endif
+#ifndef IPV6_MIN_MTU
+#define IPV6_MIN_MTU 1280
+#endif
+
#ifndef IFF_MULTI_QUEUE
#define IFF_MULTI_QUEUE 0x100
#endif