diff options
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) | |||
317 | return hoplimit; | 317 | return hoplimit; |
318 | } | 318 | } |
319 | 319 | ||
320 | static inline int ip_skb_dst_mtu(struct sk_buff *skb) | ||
321 | { | ||
322 | struct inet_sock *inet = skb->sk ? inet_sk(skb->sk) : NULL; | ||
323 | |||
324 | return (inet && inet->pmtudisc == IP_PMTUDISC_PROBE) ? | ||
325 | skb_dst(skb)->dev->mtu : dst_mtu(skb_dst(skb)); | ||
326 | } | ||
327 | |||
320 | #endif /* _ROUTE_H */ | 328 | #endif /* _ROUTE_H */ |