* [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found
@ 2018-09-10 14:19 Haishuang Yan
2018-09-10 14:19 ` [PATCH 2/2] erspan: fix error handling for erspan tunnel Haishuang Yan
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Haishuang Yan @ 2018-09-10 14:19 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov
Cc: netdev, linux-kernel, Haishuang Yan, William Tu
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>
---
net/ipv4/ip_gre.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index ae714ae..85a714d 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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] erspan: fix error handling for erspan tunnel
2018-09-10 14:19 [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found Haishuang Yan
@ 2018-09-10 14:19 ` Haishuang Yan
2018-09-10 15:52 ` William Tu
2018-09-12 6:52 ` David Miller
2018-09-10 15:53 ` [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found William Tu
2018-09-12 6:52 ` David Miller
2 siblings, 2 replies; 6+ messages in thread
From: Haishuang Yan @ 2018-09-10 14:19 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov
Cc: netdev, linux-kernel, Haishuang Yan, William Tu
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>
---
net/ipv4/ip_gre.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 85a714d..8cce0e9 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);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] erspan: fix error handling for erspan tunnel
2018-09-10 14:19 ` [PATCH 2/2] erspan: fix error handling for erspan tunnel Haishuang Yan
@ 2018-09-10 15:52 ` William Tu
2018-09-12 6:52 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: William Tu @ 2018-09-10 15:52 UTC (permalink / raw)
To: Haishuang Yan
Cc: David Miller, Alexey Kuznetsov, Linux Kernel Network Developers, LKML
On Mon, Sep 10, 2018 at 7:20 AM Haishuang Yan
<yanhaishuang@cmss.chinamobile.com> wrote:
>
> 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>
> ---
Thanks for the fix.
Acked-by: William Tu <u9012063@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found
2018-09-10 14:19 [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found Haishuang Yan
2018-09-10 14:19 ` [PATCH 2/2] erspan: fix error handling for erspan tunnel Haishuang Yan
@ 2018-09-10 15:53 ` William Tu
2018-09-12 6:52 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: William Tu @ 2018-09-10 15:53 UTC (permalink / raw)
To: Haishuang Yan
Cc: David Miller, Alexey Kuznetsov, Linux Kernel Network Developers, LKML
On Mon, Sep 10, 2018 at 7:20 AM Haishuang Yan
<yanhaishuang@cmss.chinamobile.com> wrote:
>
> 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>
> ---
LGTM.
Acked-by: William Tu <u9012063@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found
2018-09-10 14:19 [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found Haishuang Yan
2018-09-10 14:19 ` [PATCH 2/2] erspan: fix error handling for erspan tunnel Haishuang Yan
2018-09-10 15:53 ` [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found William Tu
@ 2018-09-12 6:52 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-09-12 6:52 UTC (permalink / raw)
To: yanhaishuang; +Cc: kuznet, netdev, linux-kernel, u9012063
From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Mon, 10 Sep 2018 22:19:47 +0800
> 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] erspan: fix error handling for erspan tunnel
2018-09-10 14:19 ` [PATCH 2/2] erspan: fix error handling for erspan tunnel Haishuang Yan
2018-09-10 15:52 ` William Tu
@ 2018-09-12 6:52 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2018-09-12 6:52 UTC (permalink / raw)
To: yanhaishuang; +Cc: kuznet, netdev, linux-kernel, u9012063
From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Mon, 10 Sep 2018 22:19:48 +0800
> 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-09-12 6:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10 14:19 [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found Haishuang Yan
2018-09-10 14:19 ` [PATCH 2/2] erspan: fix error handling for erspan tunnel Haishuang Yan
2018-09-10 15:52 ` William Tu
2018-09-12 6:52 ` David Miller
2018-09-10 15:53 ` [PATCH 1/2] erspan: return PACKET_REJECT when the appropriate tunnel is not found William Tu
2018-09-12 6:52 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.