diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-31 18:06:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-31 18:06:50 -0400 |
commit | caacf05e5ad1abf0a2864863da4e33024bc68ec6 (patch) | |
tree | 9a82e97a072e288f604bd3dbbe07e1796581fad0 /include/net/route.h | |
parent | c5038a8327b980a5b279fa193163c468011de009 (diff) |
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 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/route.h b/include/net/route.h index 8c52bc6f1c90..776a27f1ab78 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -57,6 +57,8 @@ struct rtable { | |||
57 | 57 | ||
58 | /* Miscellaneous cached information */ | 58 | /* Miscellaneous cached information */ |
59 | u32 rt_pmtu; | 59 | u32 rt_pmtu; |
60 | |||
61 | struct list_head rt_uncached; | ||
60 | }; | 62 | }; |
61 | 63 | ||
62 | static inline bool rt_is_input_route(const struct rtable *rt) | 64 | static inline bool rt_is_input_route(const struct rtable *rt) |
@@ -107,6 +109,7 @@ extern struct ip_rt_acct __percpu *ip_rt_acct; | |||
107 | struct in_device; | 109 | struct in_device; |
108 | extern int ip_rt_init(void); | 110 | extern int ip_rt_init(void); |
109 | extern void rt_cache_flush(struct net *net, int how); | 111 | extern void rt_cache_flush(struct net *net, int how); |
112 | extern void rt_flush_dev(struct net_device *dev); | ||
110 | extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); | 113 | extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); |
111 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, | 114 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, |
112 | struct sock *sk); | 115 | struct sock *sk); |