netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH|RFC] IPv6: have a proxy discard link-local traffic
@ 2004-01-17  7:06 Pekka Savola
  2004-01-27 21:11 ` Ville Nuorvala
  0 siblings, 1 reply; 15+ messages in thread
From: Pekka Savola @ 2004-01-17  7:06 UTC (permalink / raw)
  To: Ville Nuorvala; +Cc: yoshfuji, davem, usagi-core, netdev

(Re-sending as netdev was non-operational yesterday.)

On Fri, 16 Jan 2004, Ville Nuorvala wrote:
> > It's still at the starting phase -- now would be an excellent time to
> > bring this up.
> 
> OK, I guess I'll send a question to the ipv6 list.

Please do -- I've already raised too many issues in that spec :-)

> Let's assume the proxy handles (both link-local and global) NUD
> probes correctly. What will it do with the rest of the unicast packets?
> 
> Packets to a global address may be routed to the proxied node if the
> router has a route to it, but what should it do to link-local packets? The
> desired behavior isn't described in RFC2461, but the MIPv6 draft has a
> proposal.

Right.
 
> No, *assuming* we have a proxy capable of capturing NUD probes, my patch
> will send an Address Unreachable message in response to all link-local
> unicast traffic *except* ND, since it is already handled separately.
> Since ND works normally, my patch doesn't limit link-local proxying. It
> just warns the sender that any link-local traffic it is trying to send
> can't be delivered to the destination.

OK.
 
> > It can give back ICMP error messages, if necessary.  I don't know
> > which path a Thaler proxy would use though.
> 
> It can't really use ip6_forward() anyway, since the funtion decreases the
> hop limit of the packet and drops all traffic from a link-local source
> address etc, etc.
> 
> Since the Thaler proxy clearly needs some other forwarding function than
> ip6_forward(), my proposed patch doesn't affect its behavior in any way.

Ok, if your modification is in ip6_forward() (I didn't check), I guess 
it would OK, with a sufficient comment to bring up that a future 
implementation might treat link-local proxying differently.

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH|RFC] IPv6: have a proxy discard link-local traffic
@ 2004-01-14 10:50 Ville Nuorvala
  2004-01-14 10:59 ` Pekka Savola
  0 siblings, 1 reply; 15+ messages in thread
From: Ville Nuorvala @ 2004-01-14 10:50 UTC (permalink / raw)
  To: davem, usagi-core; +Cc: netdev

Hi Dave & Co,

the patch below causes a router proxying a link-local address to discard
traffic sent to it, also sending an ICMPv6 Destination Unreachable, Code 3
message to the source. This behavior is required by the Mobile IPv6
specification (the only user of proxy ND I'm aware of).

This seems like reasonable behavior in any case, since the router won't be
able to forward the link-local traffic to the proxied node anyway.

Thanks,
Ville

===== net/ipv6/ip6_output.c 1.48 vs 1.50 =====
--- 1.48/net/ipv6/ip6_output.c	Thu Jan  1 22:25:30 2004
+++ 1.50/net/ipv6/ip6_output.c	Wed Jan 14 12:08:51 2004
@@ -385,6 +385,15 @@
 	if (!xfrm6_route_forward(skb))
 		goto drop;

+	/* The proxy can't forward traffic sent to a link-local address,
+	   so signal the sender and discard the packet */
+
+	if (ipv6_addr_type(&hdr->daddr) & IPV6_ADDR_LINKLOCAL &&
+	    skb->dev && pneigh_lookup(&nd_tbl, &hdr->daddr, skb->dev, 0)) {
+		icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH,
+			    0, skb->dev);
+		goto drop;
+	}
 	/* IPv6 specs say nothing about it, but it is clear that we cannot
 	   send redirects to source routed frames.
 	 */
--
Ville Nuorvala
Research Assistant, Institute of Digital Communications,
Helsinki University of Technology
email: vnuorval@tcs.hut.fi, phone: +358 (0)9 451 5257

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

end of thread, other threads:[~2004-02-03 17:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-17  7:06 [PATCH|RFC] IPv6: have a proxy discard link-local traffic Pekka Savola
2004-01-27 21:11 ` Ville Nuorvala
2004-01-27 23:54   ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-28  5:26     ` Pekka Savola
2004-01-28  7:13       ` Ville Nuorvala
2004-01-28 19:59   ` David S. Miller
2004-02-03  8:19     ` YOSHIFUJI Hideaki / 吉藤英明
2004-02-03  8:24       ` (usagi-core 17336) " YOSHIFUJI Hideaki / 吉藤英明
2004-02-03 17:15         ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2004-01-14 10:50 Ville Nuorvala
2004-01-14 10:59 ` Pekka Savola
2004-01-14 15:22   ` Ville Nuorvala
2004-01-15  5:57     ` Pekka Savola
2004-01-15  8:46       ` Ville Nuorvala
2004-01-15  9:27         ` Pekka Savola

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