From: Steven Barth <cyrus@openwrt.org>
To: netdev@vger.kernel.org
Subject: [PATCH] ipv6: fix inconsistent prefix route handling
Date: Sun, 16 Feb 2014 16:48:01 +0100 [thread overview]
Message-ID: <5300DDB1.9000404@openwrt.org> (raw)
When temporary addresses are created in userspace an accompanying
on-link prefix-route is created alongside. However when said address is
afterwards removed in userspace the respective prefix route remains
until it expires. Similarly when userspace turns a permanent address
into a temporary one the prefix route remains and is not removed when
the address expires and is thus dangling until removed manually.
This behavior is inconsistent with the addition and removal of permanent
addresses and can potentially cause lots of dangling routes on
downstream interfaces on an IPv6-router with changing prefixes.
This patch runs the on-link prefix removal check also when a temporary
address is removed and thus unifies the prefix route handling.
Signed-off-by: Steven Barth <cyrus@openwrt.org>
---
net/ipv6/addrconf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ad23569..55c35d5 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1013,7 +1013,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
__in6_ifa_put(ifp);
}
- if (ifp->flags & IFA_F_PERMANENT && !(ifp->flags & IFA_F_NOPREFIXROUTE))
+ if (!(ifp->flags & IFA_F_NOPREFIXROUTE))
action = check_cleanup_prefix_route(ifp, &expires);
list_del_init(&ifp->if_list);
--
1.8.3.2
next reply other threads:[~2014-02-16 15:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 15:48 Steven Barth [this message]
2014-02-16 16:25 ` [PATCH v2] ipv6: fix inconsistent prefix route handling Steven Barth
2014-02-16 16:51 ` Hannes Frederic Sowa
2014-02-17 6:41 ` Steven Barth
2014-02-17 13:05 ` Hannes Frederic Sowa
2014-02-17 13:13 ` Steven Barth
2014-02-17 14:08 ` Hannes Frederic Sowa
2014-02-17 14:23 ` Steven Barth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5300DDB1.9000404@openwrt.org \
--to=cyrus@openwrt.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.