netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: do not create neighbor entries for local delivery
@ 2013-01-16 13:31 Marcelo Ricardo Leitner
  2013-01-16 21:28 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Marcelo Ricardo Leitner @ 2013-01-16 13:31 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

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.

Signed-off-By: Marcelo Ricardo Leitner <mleitner@redhat.com>
---
  net/ipv6/route.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 
7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..b63e33bcbdfbc1bd78af0b98ffc2d211805214ea 
100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -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);
-- 
1.7.11.7


[-- Attachment #2: Seção da mensagem anexada --]
[-- Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ipv6: do not create neighbor entries for local delivery
  2013-01-16 13:31 [PATCH] ipv6: do not create neighbor entries for local delivery Marcelo Ricardo Leitner
@ 2013-01-16 21:28 ` David Miller
  2013-01-17 11:17   ` Marcelo Ricardo Leitner
  2013-01-29 10:53   ` Jiri Pirko
  0 siblings, 2 replies; 5+ messages in thread
From: David Miller @ 2013-01-16 21:28 UTC (permalink / raw)
  To: mleitner; +Cc: netdev

From: Marcelo Ricardo Leitner <mleitner@redhat.com>
Date: Wed, 16 Jan 2013 11:31:54 -0200

> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ipv6: do not create neighbor entries for local delivery
  2013-01-16 21:28 ` David Miller
@ 2013-01-17 11:17   ` Marcelo Ricardo Leitner
  2013-01-29 10:53   ` Jiri Pirko
  1 sibling, 0 replies; 5+ messages in thread
From: Marcelo Ricardo Leitner @ 2013-01-17 11:17 UTC (permalink / raw)
  To: David Miller, yoshfuji; +Cc: netdev

Em 16-01-2013 19:28, David Miller escreveu:
> From: Marcelo Ricardo Leitner <mleitner@redhat.com>
> Date: Wed, 16 Jan 2013 11:31:54 -0200
>
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index
>> 7c34c01b515b7ac370f8021ba6f5ec4c654e9e41..b63e33bcbdfbc1bd78af0b98ffc2d211805214ea
>> 100644
>
> Patch corrupted by your email client.

Doh, really sorry about that.

> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ipv6: do not create neighbor entries for local delivery
  2013-01-16 21:28 ` David Miller
  2013-01-17 11:17   ` Marcelo Ricardo Leitner
@ 2013-01-29 10:53   ` Jiri Pirko
  2013-01-29 21:10     ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Jiri Pirko @ 2013-01-29 10:53 UTC (permalink / raw)
  To: David Miller; +Cc: mleitner, netdev, yoshfuji

Wed, Jan 16, 2013 at 10:28:13PM CET, davem@davemloft.net wrote:
>From: Marcelo Ricardo Leitner <mleitner@redhat.com>
>Date: Wed, 16 Jan 2013 11:31:54 -0200
>
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> 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.

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

I can repost this properly.

Thanks, Jiri



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ipv6: do not create neighbor entries for local delivery
  2013-01-29 10:53   ` Jiri Pirko
@ 2013-01-29 21:10     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2013-01-29 21:10 UTC (permalink / raw)
  To: jiri; +Cc: mleitner, netdev, yoshfuji

From: Jiri Pirko <jiri@resnulli.us>
Date: Tue, 29 Jan 2013 11:53:36 +0100

> Wed, Jan 16, 2013 at 10:28:13PM CET, davem@davemloft.net wrote:
>>From: Marcelo Ricardo Leitner <mleitner@redhat.com>
>>Date: Wed, 16 Jan 2013 11:31:54 -0200
>>
>>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>>> 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.
> 
> Dave, wouldn't this patch be suitable candidate for -net (/-stable) ?
> 
> I can repost this properly.

Ok, please repost, thanks Jiri.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-29 21:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16 13:31 [PATCH] ipv6: do not create neighbor entries for local delivery Marcelo Ricardo Leitner
2013-01-16 21:28 ` David Miller
2013-01-17 11:17   ` Marcelo Ricardo Leitner
2013-01-29 10:53   ` Jiri Pirko
2013-01-29 21:10     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).