Skip to content

Commit

Permalink
erspan: return PACKET_REJECT when the appropriate tunnel is not found
Browse files Browse the repository at this point in the history
If erspan tunnel hasn't been established, we'd better send icmp port
unreachable message after receive erspan packets.

Fixes: 84e54fe ("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>
  • Loading branch information
Haishuang Yan authored and David S. Miller committed Sep 12, 2018
1 parent 0297c1c commit 5a64506
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ static int erspan_rcv(struct sk_buff *skb, struct tnl_ptk_info *tpi,
ip_tunnel_rcv(tunnel, skb, tpi, tun_dst, log_ecn_error);
return PACKET_RCVD;
}
return PACKET_REJECT;

drop:
kfree_skb(skb);
return PACKET_RCVD;
Expand Down

0 comments on commit 5a64506

Please sign in to comment.