Thread (13 messages) 13 messages, 3 authors, 2012-10-08

Re: [PATCH net 1/6] ipv4: fix sending of redirects

flat view

From: David Miller <davem@davemloft.net>
Date: 2012-10-08 19:16:35

From: Julian Anastasov <ja@ssi.bg>
Date: Sun,  7 Oct 2012 14:26:03 +0300
quoted hunk ↗ jump to hunk
@@ -322,7 +322,8 @@ int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
 {
 	int r = secpath_exists(skb) ? 0 : IN_DEV_RPFILTER(idev);
 
-	if (!r && !fib_num_tclassid_users(dev_net(dev))) {
+	if (!r && !fib_num_tclassid_users(dev_net(dev)) &&
+	    dev->ifindex != oif) {
 		*itag = 0;
 		return 0;
 	}
Hmmm, won't this cause the slow path to be taken for locally
destined traffic?
+			  rt->rt_gateway ? : ip_hdr(skb)->daddr);
Please use the rt_nexthop() helper.
+		__be32 gw = rt->rt_gateway ? : ip_hdr(skb)->daddr;
Likewise.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help