mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
net: erspan: fix erspan config overwrite
When an erspan tunnel device receives an erpsan packet with different tunnel metadata (ex: version, index, hwid, direction), existing code overwrites the tunnel device's erspan configuration with the received packet's metadata. The patch fixes it. Fixes:1a66a836da("gre: add collect_md mode to ERSPAN tunnel") Fixes:f551c91de2("net: erspan: introduce erspan v2 for ip_gre") Fixes:ef7baf5e08("ip6_gre: add ip6 erspan collect_md mode") Fixes:94d7d8f292("ip6_gre: add erspan v2 support") Signed-off-by: William Tu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3df1928302
commit
39f57f6799
2 changed files with 0 additions and 18 deletions
|
|
@ -562,15 +562,6 @@ static int ip6erspan_rcv(struct sk_buff *skb, int gre_hdr_len,
|
|||
ip6_tnl_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
|
||||
|
||||
} else {
|
||||
tunnel->parms.erspan_ver = ver;
|
||||
|
||||
if (ver == 1) {
|
||||
tunnel->parms.index = ntohl(pkt_md->u.index);
|
||||
} else {
|
||||
tunnel->parms.dir = pkt_md->u.md2.dir;
|
||||
tunnel->parms.hwid = get_hwid(&pkt_md->u.md2);
|
||||
}
|
||||
|
||||
ip6_tnl_rcv(tunnel, skb, tpi, NULL, log_ecn_error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue