1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00
freebsd/sys/netinet6
Andrew Thompson 2fcb030ad5 Check the alignment of the IP header before passing the packet up to the
packet filter. This would cause a panic on architectures that require strict
alignment such as sparc64 (tier1) and ia64/ppc (tier2).

This adds two new macros that check the alignment, these are compile time
dependent on __NO_STRICT_ALIGNMENT which is set for i386 and amd64 where
alignment isn't need so the cost is avoided.

 IP_HDR_ALIGNED_P()
 IP6_HDR_ALIGNED_P()

Move bridge_ip_checkbasic()/bridge_ip6_checkbasic() up so that the alignment
is checked for ipfw and dummynet too.

PR:		ia64/81284
Obtained from:	NetBSD
Approved by:	re (dwhite), mlaier (mentor)
2005-07-02 23:13:31 +00:00
..
ah6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah_aesxcbcmac.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah_aesxcbcmac.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah_core.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah_input.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah_output.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ah.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
dest6.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_aesctr.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_aesctr.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_core.c refer opencrypto/cast.h directly. 2005-03-11 12:37:07 +00:00
esp_input.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_output.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_rijndael.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp_rijndael.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
esp.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
frag6.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
icmp6.c Fixes for various nits found by the Coverity tool. 2005-05-15 02:28:30 +00:00
icmp6.h
in6_cksum.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
in6_gif.c fix IP(v4) over IPv6 tunneling most likely broken with ifnet changes. 2005-06-20 20:17:00 +00:00
in6_gif.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
in6_ifattach.c Add CARP (Common Address Redundancy Protocol), which allows multiple 2005-02-22 13:04:05 +00:00
in6_ifattach.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
in6_pcb.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
in6_pcb.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
in6_proto.c Add CARP (Common Address Redundancy Protocol), which allows multiple 2005-02-22 13:04:05 +00:00
in6_rmx.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
in6_src.c Fixes for various nits found by the Coverity tool. 2005-05-15 02:28:30 +00:00
in6_var.h Add CARP (Common Address Redundancy Protocol), which allows multiple 2005-02-22 13:04:05 +00:00
in6.c Use IFF_LOCKGIANT/IFF_UNLOCKGIANT around calls to the interface 2005-06-02 00:04:08 +00:00
in6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_ecn.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_forward.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_fw.c Fixes for various nits found by the Coverity tool. 2005-05-15 02:28:30 +00:00
ip6_fw.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_id.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_input.c correct bounds check 2005-03-16 05:11:11 +00:00
ip6_mroute.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_mroute.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ip6_output.c Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
ip6_var.h Check the alignment of the IP header before passing the packet up to the 2005-07-02 23:13:31 +00:00
ip6.h
ip6protosw.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipcomp6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipcomp_core.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipcomp_input.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipcomp_output.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipcomp.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipsec6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
ipsec.c reported from VANHULLEBUS Yvan [remote kernel crash may result] 2005-03-09 14:39:48 +00:00
ipsec.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
mld6_var.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
mld6.c ifma_protospec is a pointer. Use NULL when assigning or compating it. 2005-03-20 14:31:45 +00:00
nd6_nbr.c Fix IPv6 neighbor discovery by using IF_LLADDR to get the mac address 2005-06-12 00:45:24 +00:00
nd6_rtr.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
nd6.c Add CARP (Common Address Redundancy Protocol), which allows multiple 2005-02-22 13:04:05 +00:00
nd6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
pim6_var.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
pim6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
raw_ip6.c check for malloc failure (also move malloc up to simplify error recovery) 2005-03-29 01:26:27 +00:00
raw_ip6.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
README
route6.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
scope6_var.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
scope6.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
tcp6_var.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
udp6_output.c /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00
udp6_usrreq.c Lock udbinfo and inp before calling in6_pcbdetach() from udp6_abort(). 2005-06-01 11:38:19 +00:00
udp6_var.h /* -> /*- for license, minor formatting changes, separate for KAME 2005-01-07 02:30:35 +00:00

a note to committers about KAME tree
$FreeBSD$
KAME project


FreeBSD IPv6/IPsec tree is from KAMEproject (http://www.kame.net/).
To synchronize KAME tree and FreeBSD better today and in the future,
please understand the following:

- DO NOT MAKE COSTMETIC CHANGES.
  "Cosmetic changes" here includes tabify, untabify, removal of space at EOL,
  minor KNF items, and whatever adds more output lines on "diff freebsd kame".
  To make future synchronization easier. it is critical to preserve certain
  statements in the code.  Also, as KAME tree supports all 4 BSDs (Free, Open,
  Net, BSD/OS) in single shared tree, it is not always possible to backport
  FreeBSD changes into KAME tree.  So again, please do not make cosmetic
  changes.  Even if you think it a right thing, that will bite KAME guys badly
  during upgrade attempts, and prevent us from synchronizing two trees.
  (you don't usually make cosmetic changes against third-party code, do you?)

- REPORT CHANGES/BUGS TO KAME GUYS.
  It is not always possible for KAME guys to watch all the freebsd mailing
  list traffic, as the traffic is HUGE.  So if possible, please, inform
  kame guys of changes you made in IPv6/IPsec related portion.  Contact
  path would be snap-users@kame.net or KAME PR database on www.kame.net.
  (or to core@kame.net if it is necessary to make it confidential)

Thank you for your cooperation and have a happy IPv6 life!


Note: KAME-origin code is in the following locations.
The above notice applies to corresponding manpages too.
The list may not be complete.  If you see $KAME$ in the code, it is from
KAME distribution.  If you see some file that is IPv6/IPsec related, it is
highly possible that the file is from KAME distribution.

include/ifaddrs.h
lib/libc/net
lib/libc/net/getaddrinfo.c
lib/libc/net/getifaddrs.c
lib/libc/net/getnameinfo.c
lib/libc/net/ifname.c
lib/libc/net/ip6opt.c
lib/libc/net/map_v4v6.c
lib/libc/net/name6.c
lib/libftpio
lib/libipsec
sbin/ip6fw
sbin/ping6
sbin/rtsol
share/doc/IPv6
share/man/man4/ip6.4
share/man/man4/inet6.4
sys/crypto (except sys/crypto/rc4)
sys/kern/uipc_mbuf2.c
sys/net/if_faith.[ch]
sys/net/if_gif.[ch]
sys/net/if_stf.[ch]
sys/net/pfkeyv2.h
sys/netinet/icmp6.h
sys/netinet/in_gif.[ch]
sys/netinet/ip6.h
sys/netinet/ip_encap.[ch]
sys/netinet6
sys/netkey
usr.sbin/faithd
usr.sbin/gifconfig
usr.sbin/ifmcstat
usr.sbin/mld6query
usr.sbin/ndp
usr.sbin/pim6dd
usr.sbin/pim6sd
usr.sbin/prefix
usr.sbin/rip6query
usr.sbin/route6d
usr.sbin/rrenumd
usr.sbin/rtadvd
usr.sbin/rtsold
usr.sbin/scope6config
usr.sbin/setkey
usr.sbin/traceroute6