netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit
@ 2016-03-03 13:20 Richard Alpe
  2016-03-03 13:20 ` [PATCH net-next v1 2/4] tipc: don't check link reset on non existing link Richard Alpe
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Richard Alpe @ 2016-03-03 13:20 UTC (permalink / raw)
  To: netdev; +Cc: tipc-discussion, Richard Alpe

Prior to this patch enabling a IPv4 UDP bearer caused a null pointer
dereference in iptunnel_xmit_stats(), when it tried to dereference the
net device from the skb. To resolve this we now point the skb device
to the net device resolved from the routing table.

Fixes: 039f50629b7f (ip_tunnel: Move stats update to iptunnel_xmit())
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@gmail.com>
---
 net/tipc/udp_media.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index d63a911..f22a5bb1 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -181,6 +181,8 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,
 			err = PTR_ERR(rt);
 			goto tx_error;
 		}
+
+		skb->dev = rt->dst.dev;
 		ttl = ip4_dst_hoplimit(&rt->dst);
 		udp_tunnel_xmit_skb(rt, ub->ubsock->sk, skb, src->ipv4.s_addr,
 				    dst->ipv4.s_addr, 0, ttl, 0, src->udp_port,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-03-07  3:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 13:20 [PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit Richard Alpe
2016-03-03 13:20 ` [PATCH net-next v1 2/4] tipc: don't check link reset on non existing link Richard Alpe
2016-03-07  3:58   ` David Miller
2016-03-03 13:20 ` [PATCH net-next v1 3/4] tipc: safely copy UDP netlink data from user Richard Alpe
2016-03-07  3:58   ` David Miller
2016-03-03 13:20 ` [PATCH net-next v1 4/4] tipc: make sure required IPv6 addresses are scoped Richard Alpe
2016-03-07  3:58   ` David Miller
2016-03-03 13:27 ` [PATCH net-next v1 1/4] tipc: add net device to skb before UDP xmit Xue, Ying
2016-03-07  3:57 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).