aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-13 22:31:32 -0700
committerDavid S. Miller <davem@davemloft.net>2008-04-13 22:31:32 -0700
commit68d185980f70413b353df99cdf5e667510036668 (patch)
tree3bbea21c14f6cd0f6feb28a66249bdeead9e3011 /net/dccp
parent[NETNS][DCCPV4]: Enable DCCPv4 in net namespaces. (diff)
downloadlinux-dev-68d185980f70413b353df99cdf5e667510036668.tar.xz
linux-dev-68d185980f70413b353df99cdf5e667510036668.zip
[NETNS][DCCPV6]: Don't pass NULL to ip6_dst_lookup.
This call uses the sock to get the net to lookup the routing in. With CONFIG_NET_NS this code will OOPS, since the sk ptr is NULL. After looking inside the ip6_dst_lookup and drawing the analogy with respective ipv6 code, it seems, that the dccp ctl socket is a good candidate for the first argument. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 94d749e6d494..b657dea9ee27 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -322,7 +322,7 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
security_skb_classify_flow(rxskb, &fl);
/* sk = NULL, but it is safe for now. RST socket required. */
- if (!ip6_dst_lookup(NULL, &skb->dst, &fl)) {
+ if (!ip6_dst_lookup(dccp_v6_ctl_sk, &skb->dst, &fl)) {
if (xfrm_lookup(&skb->dst, &fl, NULL, 0) >= 0) {
ip6_xmit(dccp_v6_ctl_sk, skb, &fl, NULL, 0);
DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS);