Subject: CVS commit: src
To: None <source-changes@NetBSD.org>
From: David Young <dyoung@netbsd.org>
List: source-changes
Date: 11/13/2006 05:13:42
Module Name: src
Committed By: dyoung
Date: Mon Nov 13 05:13:42 UTC 2006
Modified Files:
src/distrib/sets/lists/comp: mi
src/sbin/ifconfig: af_inet.c ifconfig.c
src/share/man/man9: Makefile
src/sys/net: if.c if.h route.c route.h rtsock.c
src/sys/netinet: Makefile files.netinet if_arp.c in.c in.h in_pcb.c
in_proto.c ip_output.c
src/sys/netinet6: in6.c nd6.c
src/sys/sys: sockio.h
Added Files:
src/share/man/man9: in_getifa.9
src/sys/netinet: in_ifattach.h in_selsrc.c in_selsrc.h
Log Message:
Add a source-address selection policy mechanism to the kernel.
Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses. Make ifconfig(8) set/display preference
numbers.
To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.
Miscellaneous changes in support of source-address selection:
1 Factor out some common code, producing rt_replace_ifa().
2 Abbreviate a for-loop with TAILQ_FOREACH().
3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
IN_PRIVATE(), that are true for link-local unicast
(169.254/16) and RFC1918 private addresses, respectively.
Add the predicate IN_ANY_LOCAL() that is true for link-local
unicast and multicast.
4 Add IPv4-specific interface attach/detach routines,
in_domifattach and in_domifdetach, which build #ifdef
IPSELSRC.
See in_getifa(9) for a more thorough description of source-address
selection policy.
To generate a diff of this commit:
cvs rdiff -r1.972 -r1.973 src/distrib/sets/lists/comp/mi
cvs rdiff -r1.4 -r1.5 src/sbin/ifconfig/af_inet.c
cvs rdiff -r1.177 -r1.178 src/sbin/ifconfig/ifconfig.c
cvs rdiff -r1.220 -r1.221 src/share/man/man9/Makefile
cvs rdiff -r0 -r1.1 src/share/man/man9/in_getifa.9
cvs rdiff -r1.175 -r1.176 src/sys/net/if.c
cvs rdiff -r1.119 -r1.120 src/sys/net/if.h
cvs rdiff -r1.73 -r1.74 src/sys/net/route.c
cvs rdiff -r1.43 -r1.44 src/sys/net/route.h
cvs rdiff -r1.89 -r1.90 src/sys/net/rtsock.c
cvs rdiff -r1.15 -r1.16 src/sys/netinet/Makefile
cvs rdiff -r1.12 -r1.13 src/sys/netinet/files.netinet
cvs rdiff -r1.114 -r1.115 src/sys/netinet/if_arp.c
cvs rdiff -r1.113 -r1.114 src/sys/netinet/in.c
cvs rdiff -r1.76 -r1.77 src/sys/netinet/in.h
cvs rdiff -r0 -r1.1 src/sys/netinet/in_ifattach.h src/sys/netinet/in_selsrc.c \
src/sys/netinet/in_selsrc.h
cvs rdiff -r1.107 -r1.108 src/sys/netinet/in_pcb.c
cvs rdiff -r1.77 -r1.78 src/sys/netinet/in_proto.c
cvs rdiff -r1.165 -r1.166 src/sys/netinet/ip_output.c
cvs rdiff -r1.113 -r1.114 src/sys/netinet6/in6.c
cvs rdiff -r1.105 -r1.106 src/sys/netinet6/nd6.c
cvs rdiff -r1.24 -r1.25 src/sys/sys/sockio.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.