Skip to contentSkip to conversation

ipv6: do not create neighbor entries for local delivery

PATCH In review Marcelo Ricardo Leitner 3 participants 5 messages Jan 16, 2013 – Jan 29, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: do not create neighbor entries for local delivery

They will be created at output, if ever needed. This avoids creating empty neighbor entries when TPROXYing/Forwarding packets for addresses that are not even directly reachable.

Note that IPv4 already handles it this way. No neighbor entries are created for local input.

Tested by myself and customer.

---
 net/ipv6/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/route.c +1 -1
index 7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..b63e33bcbdfbc1bd78af0b98ffc2d211805214ea 100644
@@ -921,7 +921,7 @@ restart:
 	dst_hold(&rt->dst);
 	read_unlock_bh(&table->tb6_lock);
-	if (!rt->n && !(rt->rt6i_flags & RTF_NONEXTHOP))
+	if (!rt->n && !(rt->rt6i_flags & (RTF_NONEXTHOP|RTF_LOCAL)))
 		nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
 	else if (!(rt->dst.flags & DST_HOST))
 		nrt = rt6_alloc_clone(rt, &fl6->daddr);
Signature · 1 line
1.7.11.7
maintainer
#1 lore raw

From: Marcelo Ricardo Leitner <[email protected]>
Date: Wed, 16 Jan 2013 11:31:54 -0200

Quoted 4 lines
net/ipv6/route.c +0 -0

index 7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..b63e33bcbdfbc1bd78af0b98ffc2d211805214ea 100644

Patch corrupted by your email client.

Note also that YOSHIFUJI Hideaki's patches to remove the cached neighbour entirely from ipv6 routes will have the same effect, so your patch won't be needed.

#2 lore raw

Em 16-01-2013 19:28, David Miller escreveu:

Quoted 9 lines

From: Marcelo Ricardo Leitner <[email protected]>
Date: Wed, 16 Jan 2013 11:31:54 -0200

Quoted 4 lines
net/ipv6/route.c +0 -0

index 7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..b63e33bcbdfbc1bd78af0b98ffc2d211805214ea 100644

Patch corrupted by your email client.

Doh, really sorry about that.

Quoted 3 lines

Note also that YOSHIFUJI Hideaki's patches to remove the cached neighbour entirely from ipv6 routes will have the same effect, so your patch won't be needed.

Yes but seems it needs some time yet. Mind if I submit it again (right this time)?

Thanks,
Marcelo.

#3 lore raw
In reply to David Miller
Quoted 10 lines · Wed, Jan 16, 2013 at 10:28:13PM CET, [email protected] wrote:

From: Marcelo Ricardo Leitner <[email protected]>
Date: Wed, 16 Jan 2013 11:31:54 -0200

Quoted 4 lines
net/ipv6/route.c +0 -0

index 7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..b63e33bcbdfbc1bd78af0b98ffc2d211805214ea 100644

Patch corrupted by your email client.

Quoted 3 lines

Note also that YOSHIFUJI Hideaki's patches to remove the cached neighbour entirely from ipv6 routes will have the same effect, so your patch won't be needed.

Dave, wouldn't this patch be suitable candidate for -net (/-stable) ?

I can repost this properly.

Thanks, Jiri

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#4 lore raw

From: Jiri Pirko <[email protected]>
Date: Tue, 29 Jan 2013 11:53:36 +0100

Quoted 11 lines
Quoted 10 lines · Wed, Jan 16, 2013 at 10:28:13PM CET, [email protected] wrote:

From: Marcelo Ricardo Leitner <[email protected]>
Date: Wed, 16 Jan 2013 11:31:54 -0200

Quoted 4 lines
net/ipv6/route.c +0 -0

index 7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..b63e33bcbdfbc1bd78af0b98ffc2d211805214ea 100644

Patch corrupted by your email client.

Quoted 7 lines
Quoted 3 lines

Note also that YOSHIFUJI Hideaki's patches to remove the cached neighbour entirely from ipv6 routes will have the same effect, so your patch won't be needed.

Dave, wouldn't this patch be suitable candidate for -net (/-stable) ?

I can repost this properly.

Ok, please repost, thanks Jiri.