Patch "ipv6: bump genid when the IFA_F_TENTATIVE flag is clear" has been added to the 4.8-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ipv6: bump genid when the IFA_F_TENTATIVE flag is clear
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ipv6-bump-genid-when-the-ifa_f_tentative-flag-is-clear.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Dec 8 07:19:12 CET 2016
From: Paolo Abeni <[email protected]>
Date: Tue, 22 Nov 2016 16:57:40 +0100
Subject: ipv6: bump genid when the IFA_F_TENTATIVE flag is clear
From: Paolo Abeni <[email protected]>
[ Upstream commit 764d3be6e415b40056834bfd29b994dc3f837606 ]
When an ipv6 address has the tentative flag set, it can't be used as source for egress traffic, while the associated route, if any, can be looked up and even stored into some dst_cache.
In the latter scenario, the source ipv6 address selected and stored in the cache is most probably wrong (e.g. with link-local scope) and the entity using the dst_cache will experience lack of ipv6 connectivity until said cache is cleared or invalidated.
Overall this may cause lack of connectivity over most IPv6 tunnels (comprising geneve and vxlan), if the first egress packet reaches the tunnel before the DaD is completed for the used ipv6 address.
This patch bumps a new genid after that the IFA_F_TENTATIVE flag is cleared, so that dst_cache will be invalidated on next lookup and ipv6 connectivity restored.
--- net/ipv6/addrconf.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
net/ipv6/addrconf.c +12 -6
@@ -163,7 +163,7 @@ static struct rt6_info *addrconf_get_prestatic void addrconf_dad_start (struct inet6_ifaddr *ifp);static void addrconf_dad_work (struct work_struct *w); -static void addrconf_dad_completed (struct inet6_ifaddr *ifp); +static void addrconf_dad_completed (struct inet6_ifaddr *ifp,bool bump_id);static void addrconf_dad_run (struct inet6_dev *idev);static void addrconf_rs_timer (unsigned long data);static void __ipv6_ifa_notify (int event,struct inet6_ifaddr *ifa);
@@ -2893,6 +2893,7 @@ static void add_addr(struct inet6_dev *ispin_lock_bh (&ifp->lock); ifp->flags &= ~IFA_F_TENTATIVE ;spin_unlock_bh (&ifp->lock); +rt_genid_bump_ipv6 (dev_net (idev->dev));ipv6_ifa_notify (RTM_NEWADDR , ifp);in6_ifa_put (ifp); }
@@ -3736,7 +3737,7 @@ static void addrconf_dad_begin(struct in {struct inet6_dev *idev = ifp->idev;struct net_device *dev = idev->dev; -bool notify = false; +bool bump_id, notify = false;addrconf_join_solict (dev, &ifp->addr);
@@ -3751,11 +3752,12 @@ static void addrconf_dad_begin(struct in idev->cnf.accept_dad < 1 || !(ifp->flags&IFA_F_TENTATIVE) || ifp->flags & IFA_F_NODAD) { + bump_id = ifp->flags &IFA_F_TENTATIVE ; ifp->flags &= ~(IFA_F_TENTATIVE |IFA_F_OPTIMISTIC |IFA_F_DADFAILED );spin_unlock (&ifp->lock);read_unlock_bh (&idev->lock); -addrconf_dad_completed (ifp); +addrconf_dad_completed (ifp, bump_id);return ; }
@@ -3815,8 +3817,8 @@ static void addrconf_dad_work(struct wor struct inet6_ifaddr, dad_work);struct inet6_dev *idev = ifp->idev; +bool bump_id, disable_ipv6 = false;struct in6_addr mcaddr; -bool disable_ipv6 = false;enum {DAD_PROCESS ,
@@ -3886,11 +3888,12 @@ static void addrconf_dad_work(struct wor* DAD was successful */ + bump_id = ifp->flags &IFA_F_TENTATIVE ; ifp->flags &= ~(IFA_F_TENTATIVE |IFA_F_OPTIMISTIC |IFA_F_DADFAILED );spin_unlock (&ifp->lock);write_unlock_bh (&idev->lock); -addrconf_dad_completed (ifp); +addrconf_dad_completed (ifp, bump_id); goto out; }
@@ -3927,7 +3930,7 @@ static bool ipv6_lonely_lladdr(struct inreturn true; } -static void addrconf_dad_completed (struct inet6_ifaddr *ifp) +static void addrconf_dad_completed (struct inet6_ifaddr *ifp,bool bump_id) {struct net_device *dev = ifp->idev->dev;struct in6_addr lladdr;
@@ -3978,6 +3981,9 @@ static void addrconf_dad_completed(strucspin_unlock (&ifp->lock);write_unlock_bh (&ifp->idev->lock); } + +if (bump_id) +rt_genid_bump_ipv6 (dev_net (dev)); }static void addrconf_dad_run (struct inet6_dev *idev)
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/ip6_tunnel-disable-caching-when-the-traffic-class-is-inherited.patch queue-4.8/ipv6-bump-genid-when-the-ifa_f_tentative-flag-is-clear.patch