1
0
Fork 0

erspan: return PACKET_REJECT when the appropriate tunnel is not found

[ Upstream commit 5a64506b5c ]

If erspan tunnel hasn't been established, we'd better send icmp port
unreachable message after receive erspan packets.

Fixes: 84e54fe0a5 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Haishuang Yan 2018-09-10 22:19:47 +08:00 committed by Greg Kroah-Hartman
parent 456191a855
commit 1beb52cea6
1 changed files with 2 additions and 0 deletions

View File

@ -322,6 +322,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;