[NETNS][DCCPV4]: Use proper net to route the reset packet.
authorPavel Emelyanov <xemul@openvz.org>
Mon, 14 Apr 2008 05:30:19 +0000 (22:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Apr 2008 05:30:19 +0000 (22:30 -0700)
The dccp_v4_route_skb used in dccp_v4_ctl_send_reset, currently
works with init_net's routing tables - fix it.

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>
net/dccp/ipv4.c

index cad62d8d87a0e40b18b862eccdf104caf65a9adf..11d0b8589aa7f413140ef2ca44b4ac897cf82206 100644 (file)
@@ -445,7 +445,7 @@ static struct sock *dccp_v4_hnd_req(struct sock *sk, struct sk_buff *skb)
        return sk;
 }
 
-static struct dst_entry* dccp_v4_route_skb(struct sock *sk,
+static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk,
                                           struct sk_buff *skb)
 {
        struct rtable *rt;
@@ -462,7 +462,7 @@ static struct dst_entry* dccp_v4_route_skb(struct sock *sk,
                          };
 
        security_skb_classify_flow(skb, &fl);
-       if (ip_route_output_flow(&init_net, &rt, &fl, sk, 0)) {
+       if (ip_route_output_flow(net, &rt, &fl, sk, 0)) {
                IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES);
                return NULL;
        }
@@ -515,7 +515,7 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
        if (rxskb->rtable->rt_type != RTN_LOCAL)
                return;
 
-       dst = dccp_v4_route_skb(ctl_sk, rxskb);
+       dst = dccp_v4_route_skb(net, ctl_sk, rxskb);
        if (dst == NULL)
                return;