• Denis V. Lunev's avatar
    [IPV6]: Fix refcounting for anycast dst entries. · 84f59370
    Denis V. Lunev authored
    Anycast DST entries allocated inside ipv6_dev_ac_inc are leaked when
    network device is stopped without removing IPv6 addresses from it. The
    bug has been observed in the reality on 2.6.18-rhel5 kernel.
    
    In the above case addrconf_ifdown marks all entries as obsolete and
    ip6_del_rt called from __ipv6_dev_ac_dec returns ENOENT. The
    referrence is not dropped.
    
    The fix is simple. DST entry should not keep referrence when stored in
    the FIB6 tree.
    Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    84f59370
anycast.c 11.9 KB