diff options
author | Jonas Bonn <jonas@norrbonn.se> | 2021-02-03 08:08:02 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-02-04 09:29:58 -0800 |
commit | a9c0df76d002111d0796cf04b5ad16f4f5a8d794 (patch) | |
tree | 942306df2e896a43e62c3a31015b1d9238451d30 /drivers/net/gtp.c | |
parent | e1b2914e645caa702ad6ddf4f1c48bdedb3d43cf (diff) |
gtp: really check namespaces before xmit
Blindly assuming that packet transmission crosses namespaces results in
skb marks being lost in the single namespace case.
Signed-off-by: Jonas Bonn <jonas@norrbonn.se>
Acked-by: Harald Welte <laforge@gnumonks.org>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/gtp.c')
-rw-r--r-- | drivers/net/gtp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 5682d3ba7aa5..e4e57c0552ee 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -592,7 +592,9 @@ static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev) ip4_dst_hoplimit(&pktinfo.rt->dst), 0, pktinfo.gtph_port, pktinfo.gtph_port, - true, false); + !net_eq(sock_net(pktinfo.pctx->sk), + dev_net(dev)), + false); break; } |