Skip to content

Commit 51dc63e

Browse files
Haishuang Yandavem330
Haishuang Yan
authored andcommitted
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: 84e54fe ("gre: introduce native tunnel support for ERSPAN") Cc: William Tu <[email protected]> Signed-off-by: Haishuang Yan <[email protected]> Acked-by: William Tu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5a64506 commit 51dc63e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ipv4/ip_gre.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ static void ipgre_err(struct sk_buff *skb, u32 info,
178178

179179
if (tpi->proto == htons(ETH_P_TEB))
180180
itn = net_generic(net, gre_tap_net_id);
181+
else if (tpi->proto == htons(ETH_P_ERSPAN) ||
182+
tpi->proto == htons(ETH_P_ERSPAN2))
183+
itn = net_generic(net, erspan_net_id);
181184
else
182185
itn = net_generic(net, ipgre_net_id);
183186

0 commit comments

Comments
 (0)