summaryrefslogtreecommitdiff
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-31 15:06:50 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-31 15:06:50 -0700
commitcaacf05e5ad1abf0a2864863da4e33024bc68ec6 (patch)
tree9a82e97a072e288f604bd3dbbe07e1796581fad0 /net/ipv4/xfrm4_policy.c
parentc5038a8327b980a5b279fa193163c468011de009 (diff)
downloadlinux-stable-caacf05e5ad1abf0a2864863da4e33024bc68ec6.tar.gz
linux-stable-caacf05e5ad1abf0a2864863da4e33024bc68ec6.tar.bz2
linux-stable-caacf05e5ad1abf0a2864863da4e33024bc68ec6.zip
ipv4: Properly purge netdev references on uncached routes.
When a device is unregistered, we have to purge all of the references to it that may exist in the entire system. If a route is uncached, we currently have no way of accomplishing this. So create a global list that is scanned when a network device goes down. This mirrors the logic in net/core/dst.c's dst_ifdown(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-rw-r--r--net/ipv4/xfrm4_policy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index c6281847f16a..681ea2f413e2 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -92,6 +92,7 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
xdst->u.rt.rt_type = rt->rt_type;
xdst->u.rt.rt_gateway = rt->rt_gateway;
xdst->u.rt.rt_pmtu = rt->rt_pmtu;
+ INIT_LIST_HEAD(&xdst->u.rt.rt_uncached);
return 0;
}