aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-01-27 17:55:22 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-27 17:55:22 -0500
commit8f2771f2b85aea4d0f9a0137ad3b63d1173c0962 (patch)
treeb632e0a811dee0637017d6f024e5efade412f0d1
parentc2aa3665cf8510b1665ee2f5a9525cf7be6dec4f (diff)
ipv6: Remove route peer binding assertions.
They are bogus. The basic idea is that I wanted to make sure that prefixed routes never bind to peers. The test I used was whether RTF_CACHE was set. But first of all, the RTF_CACHE flag is set at different spots depending upon which ip6_rt_copy() caller you're talking about. I've validated all of the code paths, and even in the future where we bind peers more aggressively (for route metric COW'ing) we never bind to prefix'd routes, only fully specified ones. This even applies when addrconf or icmp6 routes are allocated. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/route.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1534508f6c68..28a85fc63cb8 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -194,7 +194,6 @@ static void ip6_dst_destroy(struct dst_entry *dst)
194 in6_dev_put(idev); 194 in6_dev_put(idev);
195 } 195 }
196 if (peer) { 196 if (peer) {
197 BUG_ON(!(rt->rt6i_flags & RTF_CACHE));
198 rt->rt6i_peer = NULL; 197 rt->rt6i_peer = NULL;
199 inet_putpeer(peer); 198 inet_putpeer(peer);
200 } 199 }
@@ -204,9 +203,6 @@ void rt6_bind_peer(struct rt6_info *rt, int create)
204{ 203{
205 struct inet_peer *peer; 204 struct inet_peer *peer;
206 205
207 if (WARN_ON(!(rt->rt6i_flags & RTF_CACHE)))
208 return;
209
210 peer = inet_getpeer_v6(&rt->rt6i_dst.addr, create); 206 peer = inet_getpeer_v6(&rt->rt6i_dst.addr, create);
211 if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL) 207 if (peer && cmpxchg(&rt->rt6i_peer, NULL, peer) != NULL)
212 inet_putpeer(peer); 208 inet_putpeer(peer);