From: Mika Liljeberg <mika.liljeberg@welho.com>
To: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: netdev@oss.sgi.com
Subject: [PATCH] IPv6: Fix broken anycast usage
Date: 12 Jul 2003 11:13:10 +0300 [thread overview]
Message-ID: <1057997590.1142.31.camel@hades> (raw)
[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]
This is against 2.5.75.
The patch fixes several places where anycast addresses should be treated
equivalently with unicast addresses. In particular, this includes
tunnels and routes pointing to anycast addresses.
I modified ipv6_addr_type() to return IPV6_ADDR_UNICAST also for anycast
addresses. IPV6_ADDR_ANYCAST is now added as an additional flag when the
address is one of the known anycast addresses.
I looked very hard at neighbor discovery and didn't see anything that
needs to be changed, but you might want to have a second look. One small
difference is that ND will now also try respond to neighbor
solicitations coming from known anycast addresses (very unlikely). IMHO,
this doesn't need to be policed. In general, there is no reliable way to
check if a remote address is anycast, anyway. From RFC2461:
Note that an anycast address is syntactically
indistinguishable from a unicast address. Thus, nodes
sending packets to anycast addresses don't generally
know that an anycast address is being used. Throughout
the rest of this document, references to unicast
addresses also apply to anycast addresses in those
cases where the node is unaware that a unicast address
is actually an anycast address.
Thanks,
MikaL
[-- Attachment #2: 2.5.75-anycast.udiff --]
[-- Type: text/x-patch, Size: 799 bytes --]
diff -ur orig/linux-2.5.75/net/ipv6/addrconf.c linux-2.5.75/net/ipv6/addrconf.c
--- orig/linux-2.5.75/net/ipv6/addrconf.c 2003-07-10 23:14:49.000000000 +0300
+++ linux-2.5.75/net/ipv6/addrconf.c 2003-07-12 10:01:57.000000000 +0300
@@ -208,16 +208,15 @@
break;
};
return type;
- }
+ } else
+ type = IPV6_ADDR_UNICAST;
+
/* check for reserved anycast addresses */
-
if ((st & htonl(0xE0000000)) &&
((addr->s6_addr32[2] == htonl(0xFDFFFFFF) &&
(addr->s6_addr32[3] | htonl(0x7F)) == (u32)~0) ||
(addr->s6_addr32[2] == 0 && addr->s6_addr32[3] == 0)))
- type = IPV6_ADDR_ANYCAST;
- else
- type = IPV6_ADDR_UNICAST;
+ type |= IPV6_ADDR_ANYCAST;
/* Consider all addresses with the first three bits different of
000 and 111 as finished.
next reply other threads:[~2003-07-12 8:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-12 8:13 Mika Liljeberg [this message]
2003-07-15 0:29 ` [PATCH] IPv6: Fix broken anycast usage kuznet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1057997590.1142.31.camel@hades \
--to=mika.liljeberg@welho.com \
--cc=netdev@oss.sgi.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).