- fixed typos
- improved some comment descriptions
- use NULL, instead of 0, to denote a NULL pointer
- avoid embedding a magic number in the code
- use nd6log() instead of log() to record NDP-specific logs
- nuked an unnecessay white space
Revision Path
1.67 src/sys/netinet6/icmp6.c
1.55 src/sys/netinet6/in6.c
1.29 src/sys/netinet6/in6_ifattach.c
1.56 src/sys/netinet6/nd6.c
1.35 src/sys/netinet6/nd6_nbr.c
1.29 src/sys/netinet6/nd6_rtr.c
- most of the kernel code will not care about the actual encoding of
scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
scoped addresses as a special case.
- scope boundary check will be stricter. For example, the current
*BSD code allows a packet with src=::1 and dst=(some global IPv6
address) to be sent outside of the node, if the application do:
s = socket(AF_INET6);
bind(s, "::1");
sendto(s, some_global_IPv6_addr);
This is clearly wrong, since ::1 is only meaningful within a single
node, but the current implementation of the *BSD kernel cannot
reject this attempt.
sys/net/if_gif.c: 1.53
sys/net/if_spppsubr.c: 1.120
sys/netinet/icmp6.h: 1.19
sys/netinet/ip_carp.c: 1.28,1.29
sys/netinet/ip_fw2.c: 1.107
sys/netinet/tcp_subr.c: 1.230,1.231,1.235
sys/netinet/tcp_usrreq.c: 1.125
sys/netinet6/ah_core.c: 1.26
sys/netinet6/icmp6.c: 1.63,1.64
sys/netinet6/in6.c: 1.52
sys/netinet6/in6.h: 1.38
sys/netinet6/in6_cksum.c: 1.11
sys/netinet6/in6_ifattach.c: 1.27
sys/netinet6/in6_pcb.c: 1.63
sys/netinet6/in6_proto.c: 1.33
sys/netinet6/in6_src.c: 1.31,1.32
sys/netinet6/in6_var.h: 1.22
sys/netinet6/ip6_forward.c: 1.29
sys/netinet6/ip6_input.c: 1.83
sys/netinet6/ip6_mroute.c: 1.30
sys/netinet6/ip6_output.c: 1.95
sys/netinet6/ip6_var.h: 1.33
sys/netinet6/ipsec.c: 1.43
sys/netinet6/mld6.c: 1.21
sys/netinet6/nd6.c: 1.50
sys/netinet6/nd6_nbr.c: 1.30
sys/netinet6/nd6_rtr.c: 1.27
sys/netinet6/raw_ip6.c: 1.54
sys/netinet6/route6.c: 1.12
sys/netinet6/scope6.c: 1.13,1.14,1.15
sys/netinet6/scope6_var.h: 1.5
sys/netinet6/udp6_output.c: 1.23
sys/netinet6/udp6_usrreq.c: 1.55
sys/netkey/key.c: 1.72,1.73
(aka RFC2292bis). Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.
Obtained from: KAME
that covers updates to the contents. Note this is separate from holding
a reference and/or locking the routing table itself.
Other/related changes:
o rtredirect loses the final parameter by which an rtentry reference
may be returned; this was never used and added unwarranted complexity
for locking.
o minor style cleanups to routing code (e.g. ansi-fy function decls)
o remove the logic to bump the refcnt on the parent of cloned routes,
we assume the parent will remain as long as the clone; doing this avoids
a circularity in locking during delete
o convert some timeouts to MPSAFE callouts
Notes:
1. rt_mtx in struct rtentry is guarded by #ifdef _KERNEL as user-level
applications cannot/do-no know about mutex's. Doing this requires
that the mutex be the last element in the structure. A better solution
is to introduce an externalized version of struct rtentry but this is
a major task because of the intertwining of rtentry and other data
structures that are visible to user applications.
2. There are known LOR's that are expected to go away with forthcoming
work to eliminate many held references. If not these will be resolved
prior to release.
3. ATM changes are untested.
Sponsored by: FreeBSD Foundation
Obtained from: BSD/OS (partly)
control whether to accept RAs per-interface basis.
the new stuff ensures the backward compatibility;
- the kernel does not accept RAs on any interfaces by default.
- since the default value of the flag bit is on, the kernel accepts RAs
on all interfaces when net.inet6.ip6.accept_rtadv is 1.
Obtained from: KAME
MFC after: 1 week
the entry being removed (ret_nrt != NULL), increment the entry's
rt_refcnt like we do it for RTM_ADD and RTM_RESOLVE, rather than
messing around with 1->0 transitions for rtfree() all over.
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
complexities associated with having MD (asm and inline) versions, and
having to prevent exposure of these functions in other headers that
happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.
Tested on: alpha, i386
Reviewed by: bde, jake, tmm
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.
TODO:
- The definitions of SADB_* in sys/net/pfkeyv2.h are still different
from RFC2407/IANA assignment because of binary compatibility
issue. It should be fixed under 5-CURRENT.
- ip6po_m member of struct ip6_pktopts is no longer used. But, it
is still there because of binary compatibility issue. It should
be removed under 5-CURRENT.
Reviewed by: itojun
Obtained from: KAME
MFC after: 3 weeks
packet divert at kernel for IPv6/IPv4 translater daemon
This includes queue related patch submitted by jburkhol@home.com.
Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
for IPv6 yet)
With this patch, you can assigne IPv6 addr automatically, and can reply to
IPv6 ping.
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project