aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2012-03-06 16:20:26 -0500
committerDavid S. Miller <davem@davemloft.net>2012-03-08 03:30:24 -0500
commit5faa5df1fa2024bd750089ff21dcc4191798263d (patch)
treea47a76a4bd9a3b61dcc2d2a34149e6ffecdf8cd8 /include/net
parentdcf353b17007841f91e1735e33790508c84c9ad0 (diff)
inetpeer: Invalidate the inetpeer tree along with the routing cache
We initialize the routing metrics with the values cached on the inetpeer in rt_init_metrics(). So if we have the metrics cached on the inetpeer, we ignore the user configured fib_metrics. To fix this issue, we replace the old tree with a fresh initialized inet_peer_base. The old tree is removed later with a delayed work queue. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/inetpeer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 06b795dd5906..ff04a33acf00 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -41,6 +41,7 @@ struct inet_peer {
41 u32 pmtu_orig; 41 u32 pmtu_orig;
42 u32 pmtu_learned; 42 u32 pmtu_learned;
43 struct inetpeer_addr_base redirect_learned; 43 struct inetpeer_addr_base redirect_learned;
44 struct list_head gc_list;
44 /* 45 /*
45 * Once inet_peer is queued for deletion (refcnt == -1), following fields 46 * Once inet_peer is queued for deletion (refcnt == -1), following fields
46 * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp 47 * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp
@@ -96,6 +97,8 @@ static inline struct inet_peer *inet_getpeer_v6(const struct in6_addr *v6daddr,
96extern void inet_putpeer(struct inet_peer *p); 97extern void inet_putpeer(struct inet_peer *p);
97extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout); 98extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout);
98 99
100extern void inetpeer_invalidate_tree(int family);
101
99/* 102/*
100 * temporary check to make sure we dont access rid, ip_id_count, tcp_ts, 103 * temporary check to make sure we dont access rid, ip_id_count, tcp_ts,
101 * tcp_ts_stamp if no refcount is taken on inet_peer 104 * tcp_ts_stamp if no refcount is taken on inet_peer