Hi all,

in the same way of this patch, why dst_entry are stored for
RAW socket ? In case of specific IPSec rules for ICMPv6,
xfrm state can be different for the same destination.
Attached, a proposed patch.

Regards,
Nicolas

[IPV6] Don't store dst_entry for RAW socket

Signed-off-by: Nicolas DICHTEL <[EMAIL PROTECTED]>

Mitsuru KANDA a écrit :

Hello,

I recreated a patch for unconnected udpv6 socket checking.
(Fixed forgetting dst refcnt decrement from the previous patch.)

Regards,
-mk

At Thu, 22 Sep 2005 23:44:05 -0700 (PDT),
"David S. Miller" <[EMAIL PROTECTED]> wrote:
...

I think you're patch adds a route leak.  If we elide the
ip6_dst_store() where does the 'dst' reference go?

In fact, I think the UDPv6 change might have done the same thing.
Mitsuru-san?

ipv4 code like this does explicit dst_clone() when storeing
the 'dst' to the socket, but I can't see where ipv6 is doing
this.  Perhaps ipv6 dst's work a little differently. :-)

--- linux-2.6.15.2/net/ipv6/raw.c       2006-01-31 07:25:07.000000000 +0100
+++ linux-2.6.15.2-new/net/ipv6/raw.c   2006-02-06 11:46:13.000000000 +0100
@@ -814,10 +814,7 @@
                        err = rawv6_push_pending_frames(sk, &fl, rp);
        }
 done:
-       ip6_dst_store(sk, dst,
-                     ipv6_addr_equal(&fl.fl6_dst, &np->daddr) ?
-                     &np->daddr : NULL);
-
+       dst_release(dst);
        release_sock(sk);
 out:   
        fl6_sock_release(flowlabel);

Reply via email to