diff options
author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2018-09-10 22:19:47 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-11 23:50:53 -0700 |
commit | 5a64506b5c2c3cdb29d817723205330378075448 (patch) | |
tree | 0d277fb18f3a66184b6020c04fbc885b71f950fd /net | |
parent | 0297c1c2eadb5bd996a873b87597af3b91c0d4ba (diff) |
erspan: return PACKET_REJECT when the appropriate tunnel is not found
If erspan tunnel hasn't been established, we'd better send icmp port
unreachable message after receive erspan packets.
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')
-rw-r--r-- | net/ipv4/ip_gre.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index ae714aecc31c..85a714d36b66 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -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; |