diff options
author | Chris Mason <chris.mason@fusionio.com> | 2013-09-21 18:44:55 +0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-21 18:44:55 +0400 |
commit | 07f0e62e7f2533918f28e780ab3cfeea1a63145d (patch) | |
tree | cb64b7cf275f1a5fd7f121f4f434e77dc6769e37 /include/net/route.h | |
parent | d7396f07358a7c6e22c238d36d1d85f9d652a414 (diff) | |
parent | 6e4664525b1db28f8c4e1130957f70a94c19213e (diff) | |
download | linux-07f0e62e7f2533918f28e780ab3cfeea1a63145d.tar.xz |
Merge tag 'v3.11' into for-linus
Linux 3.11
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/route.h b/include/net/route.h index 2ea40c1b5e00..afdeeb5bec25 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -317,4 +317,12 @@ static inline int ip4_dst_hoplimit(const struct dst_entry *dst) return hoplimit; } +static inline int ip_skb_dst_mtu(struct sk_buff *skb) +{ + struct inet_sock *inet = skb->sk ? inet_sk(skb->sk) : NULL; + + return (inet && inet->pmtudisc == IP_PMTUDISC_PROBE) ? + skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); +} + #endif /* _ROUTE_H */ |