aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/gtp.c
diff options
context:
space:
mode:
authorJonas Bonn <[email protected]>2021-02-03 08:08:02 +0100
committerJakub Kicinski <[email protected]>2021-02-04 09:29:58 -0800
commita9c0df76d002111d0796cf04b5ad16f4f5a8d794 (patch)
tree942306df2e896a43e62c3a31015b1d9238451d30 /drivers/net/gtp.c
parentgtp: include role in link info (diff)
downloadwireguard-linux-a9c0df76d002111d0796cf04b5ad16f4f5a8d794.tar.xz
wireguard-linux-a9c0df76d002111d0796cf04b5ad16f4f5a8d794.zip
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 <[email protected]> Acked-by: Harald Welte <[email protected]> Acked-by: Pravin B Shelar <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/gtp.c')
-rw-r--r--drivers/net/gtp.c4
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;
}
OSZAR »