diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2014-02-26 01:20:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-26 15:51:01 -0500 |
commit | 0b95227a7ba7e69f795757cd7c839eff0615f2d1 (patch) | |
tree | c7e343f11b05e29cf4d9ccc4b2026f0002fd78f7 /include/net/ip6_route.h | |
parent | 1b346576359c72bee34b1476b4fc63d77d37b314 (diff) |
ipv6: yet another new IPV6_MTU_DISCOVER option IPV6_PMTUDISC_OMIT
This option has the same semantic as IP_PMTUDISC_OMIT for IPv4 which
got recently introduced. It doesn't honor the path mtu discovered by the
host but in contrary to IPV6_PMTUDISC_INTERFACE allows the generation of
fragments if the packet size exceeds the MTU of the outgoing interface
MTU.
Fixes: 93b36cf3425b9b ("ipv6: support IPV6_PMTU_INTERFACE on sockets")
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r-- | include/net/ip6_route.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 017badb1aec7..00e3f12cb2f9 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -171,7 +171,14 @@ static inline int ip6_skb_dst_mtu(struct sk_buff *skb) static inline bool ip6_sk_accept_pmtu(const struct sock *sk) { - return inet6_sk(sk)->pmtudisc != IPV6_PMTUDISC_INTERFACE; + return inet6_sk(sk)->pmtudisc != IPV6_PMTUDISC_INTERFACE && + inet6_sk(sk)->pmtudisc != IPV6_PMTUDISC_OMIT; +} + +static inline bool ip6_sk_local_df(const struct sock *sk) +{ + return inet6_sk(sk)->pmtudisc < IPV6_PMTUDISC_DO || + inet6_sk(sk)->pmtudisc == IPV6_PMTUDISC_OMIT; } static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt) |