Merge branch 'vxlan-geneve-linear'
Stefano Brivio says: ==================== Don't assume linear buffers in error handlers for VXLAN and GENEVE Guillaume noticed the same issue fixed by commit 26fc181e6cac ("fou, fou6: do not assume linear skbs") for fou and fou6 is also present in VXLAN and GENEVE error handlers: we can't assume linear buffers there, we need to use pskb_may_pull() instead. ==================== Acked-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
93c65f83f2
@ -395,7 +395,7 @@ static int geneve_udp_encap_err_lookup(struct sock *sk, struct sk_buff *skb)
|
||||
u8 zero_vni[3] = { 0 };
|
||||
u8 *vni = zero_vni;
|
||||
|
||||
if (skb->len < GENEVE_BASE_HLEN)
|
||||
if (!pskb_may_pull(skb, skb_transport_offset(skb) + GENEVE_BASE_HLEN))
|
||||
return -EINVAL;
|
||||
|
||||
geneveh = geneve_hdr(skb);
|
||||
|
@ -1766,7 +1766,7 @@ static int vxlan_err_lookup(struct sock *sk, struct sk_buff *skb)
|
||||
struct vxlanhdr *hdr;
|
||||
__be32 vni;
|
||||
|
||||
if (skb->len < VXLAN_HLEN)
|
||||
if (!pskb_may_pull(skb, skb_transport_offset(skb) + VXLAN_HLEN))
|
||||
return -EINVAL;
|
||||
|
||||
hdr = vxlan_hdr(skb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user