diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/dst.h | 8 | ||||
-rw-r--r-- | include/net/net_namespace.h | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 33d2a5433924..c63d2c37f6e9 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -504,4 +504,12 @@ static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) } #endif +static inline void skb_dst_update_pmtu(struct sk_buff *skb, u32 mtu) +{ + struct dst_entry *dst = skb_dst(skb); + + if (dst && dst->ops->update_pmtu) + dst->ops->update_pmtu(dst, NULL, skb, mtu); +} + #endif /* _NET_DST_H */ diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index f8a84a2c2341..f306b2aa15a4 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -223,6 +223,11 @@ int net_eq(const struct net *net1, const struct net *net2) return net1 == net2; } +static inline int check_net(const struct net *net) +{ + return refcount_read(&net->count) != 0; +} + void net_drop_ns(void *); #else @@ -247,6 +252,11 @@ int net_eq(const struct net *net1, const struct net *net2) return 1; } +static inline int check_net(const struct net *net) +{ + return 1; +} + #define net_drop_ns NULL #endif |