mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 18:30:06 +00:00
vxlan: don't collect metadata if remote checksum is wrong
call vxlan_remcsum() before md filling in vxlan_rcv() Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7470558240
commit
2ae2904b5b
1 changed files with 4 additions and 3 deletions
|
@ -1875,6 +1875,10 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
|
|||
!net_eq(vxlan->net, dev_net(vxlan->dev))))
|
||||
goto drop;
|
||||
|
||||
if (vs->flags & VXLAN_F_REMCSUM_RX)
|
||||
if (!vxlan_remcsum(&unparsed, skb, vs->flags))
|
||||
goto drop;
|
||||
|
||||
if (vxlan_collect_metadata(vs)) {
|
||||
struct metadata_dst *tun_dst;
|
||||
|
||||
|
@ -1891,9 +1895,6 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
|
|||
memset(md, 0, sizeof(*md));
|
||||
}
|
||||
|
||||
if (vs->flags & VXLAN_F_REMCSUM_RX)
|
||||
if (!vxlan_remcsum(&unparsed, skb, vs->flags))
|
||||
goto drop;
|
||||
if (vs->flags & VXLAN_F_GBP)
|
||||
vxlan_parse_gbp_hdr(&unparsed, skb, vs->flags, md);
|
||||
/* Note that GBP and GPE can never be active together. This is
|
||||
|
|
Loading…
Reference in a new issue