diff options
| author | David S. Miller <davem@davemloft.net> | 2018-10-18 07:51:14 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-10-18 07:51:14 +0300 |
| commit | dc6d0f0b4340ef6814d5345dbeaa5e909395dd1d (patch) | |
| tree | 8446305611f6d7e76b1470f1ca91f8bdb822b7bf /include | |
| parent | 0ac1077e3a549bf8d35971613e2be05bdbb41a00 (diff) | |
| parent | 6b4f92af3d59e882d3ba04c44a815266890d188f (diff) | |
| download | linux-dc6d0f0b4340ef6814d5345dbeaa5e909395dd1d.tar.xz | |
Merge branch 'geneve-vxlan-mtu'
Stefano Brivio says:
====================
geneve, vxlan: Don't set exceptions if skb->len < mtu
This series fixes the exception abuse described in 2/2, and 1/2
is just a preparatory change to make 2/2 less ugly.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dst.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 7f735e76ca73..6cf0870414c7 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -527,4 +527,14 @@ static inline void skb_dst_update_pmtu(struct sk_buff *skb, u32 mtu) dst->ops->update_pmtu(dst, NULL, skb, mtu); } +static inline void skb_tunnel_check_pmtu(struct sk_buff *skb, + struct dst_entry *encap_dst, + int headroom) +{ + u32 encap_mtu = dst_mtu(encap_dst); + + if (skb->len > encap_mtu - headroom) + skb_dst_update_pmtu(skb, encap_mtu - headroom); +} + #endif /* _NET_DST_H */ |
