diff options
author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2018-09-10 16:19:48 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-12 08:50:54 +0200 |
commit | 51dc63e3911fbb1f0a7a32da2fe56253e2040ea4 (patch) | |
tree | 053ec6cc02a89c352924e7145cbe395033355f0f /net/ipv4 | |
parent | erspan: return PACKET_REJECT when the appropriate tunnel is not found (diff) | |
download | linux-51dc63e3911fbb1f0a7a32da2fe56253e2040ea4.tar.xz linux-51dc63e3911fbb1f0a7a32da2fe56253e2040ea4.zip |
erspan: fix error handling for erspan tunnel
When processing icmp unreachable message for erspan tunnel, tunnel id
should be erspan_net_id instead of ipgre_net_id.
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Cc: William Tu <u9012063@gmail.com>
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Acked-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_gre.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 85a714d36b66..8cce0e9ea08c 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -178,6 +178,9 @@ static void ipgre_err(struct sk_buff *skb, u32 info, if (tpi->proto == htons(ETH_P_TEB)) itn = net_generic(net, gre_tap_net_id); + else if (tpi->proto == htons(ETH_P_ERSPAN) || + tpi->proto == htons(ETH_P_ERSPAN2)) + itn = net_generic(net, erspan_net_id); else itn = net_generic(net, ipgre_net_id); |