Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ca043569390c528de4cd5ec9e07502f2bf4ecd1f
Commit:     ca043569390c528de4cd5ec9e07502f2bf4ecd1f
Parent:     95c385b4d5a71b8ad552aecaa968ea46d7da2f6a
Author:     YOSHIFUJI Hideaki <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 28 23:13:20 2007 +0900
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:23:44 2007 -0700

    [IPV6] ADDRCONF: Fix possible inet6_ifaddr leakage with 
CONFIG_OPTIMISTIC_DAD.
    
    The inet6_ifaddr for source address of RS is leaked if the address
    is not an optimistic address.
    
    Signed-off-by: YOSHIFUJI Hideaki <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv6/ndisc.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b79b000..053147a 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -627,7 +627,6 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr 
*saddr,
        struct sk_buff *skb;
        struct icmp6hdr *hdr;
        __u8 * opt;
-       struct inet6_ifaddr *ifp;
        int send_sllao = dev->addr_len;
        int len;
        int err;
@@ -643,12 +642,12 @@ void ndisc_send_rs(struct net_device *dev, struct 
in6_addr *saddr,
         * supress the inclusion of the sllao.
         */
        if (send_sllao) {
-               ifp = ipv6_get_ifaddr(saddr, dev, 1);
+               struct inet6_ifaddr *ifp = ipv6_get_ifaddr(saddr, dev, 1);
                if (ifp) {
                        if (ifp->flags & IFA_F_OPTIMISTIC)  {
-                               send_sllao=0;
-                               in6_ifa_put(ifp);
+                               send_sllao = 0;
                        }
+                       in6_ifa_put(ifp);
                } else {
                        send_sllao = 0;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to