summaryrefslogtreecommitdiffstats
path: root/include/net/ip6_route.h
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2013-12-15 03:41:14 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-18 17:37:05 -0500
commit93b36cf3425b9bd9c56df7680fb237686b9c82ae (patch)
tree1562e2899394e011e22ce21523dd6ce1defc3ee8 /include/net/ip6_route.h
parentcd174e67a6b312fce9bab502ba2b0583e11f537f (diff)
downloadblackbird-obmc-linux-93b36cf3425b9bd9c56df7680fb237686b9c82ae.tar.gz
blackbird-obmc-linux-93b36cf3425b9bd9c56df7680fb237686b9c82ae.zip
ipv6: support IPV6_PMTU_INTERFACE on sockets
IPV6_PMTU_INTERFACE is the same as IPV6_PMTU_PROBE for ipv6. Add it nontheless for symmetry with IPv4 sockets. Also drop incoming MTU information if this mode is enabled. The additional bit in ipv6_pinfo just eats in the padding behind the bitfield. There are no changes to the layout of the struct at all. 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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 733747ce163c..c2626ce1f2ad 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -178,10 +178,15 @@ static inline int ip6_skb_dst_mtu(struct sk_buff *skb)
{
struct ipv6_pinfo *np = skb->sk ? inet6_sk(skb->sk) : NULL;
- return (np && np->pmtudisc == IPV6_PMTUDISC_PROBE) ?
+ return (np && np->pmtudisc >= IPV6_PMTUDISC_PROBE) ?
skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb));
}
+static inline bool ip6_sk_accept_pmtu(const struct sock *sk)
+{
+ return inet6_sk(sk)->pmtudisc != IPV6_PMTUDISC_INTERFACE;
+}
+
static inline struct in6_addr *rt6_nexthop(struct rt6_info *rt)
{
return &rt->rt6i_gateway;
OpenPOWER on IntegriCloud