freebsd-dev/sys/netipsec
Andrey V. Elsukov 1ae800e7a6 Fix handling of scoped IPv6 addresses in IPSec code.
* in ipsec_encap() embed scope zone ids into link-local addresses
  in the new IPv6 header, this helps ip6_output() disambiguate the
  scope;
* teach key_ismyaddr6() use in6_localip(). in6_localip() is less
  strict than key_sockaddrcmp(). It doesn't compare all fileds of
  struct sockaddr_in6, but it is faster and it should be safe,
  because all SA's data was checked for correctness. Also, since
  IPv6 link-local addresses in the &V_in6_ifaddrhead are stored in
  kernel-internal form, we need to embed scope zone id from SA into
  the address before calling in6_localip.
* in ipsec_common_input() take scope zone id embedded in the address
  and use it to initialize sin6_scope_id, then use this sockaddr
  structure to lookup SA, because we keep addresses in the SADB without
  embedded scope zone id.

Differential Revision:	https://reviews.freebsd.org/D2304
Reviewed by:	gnn
Sponsored by:	Yandex LLC
2015-04-18 16:46:31 +00:00
..
ah_var.h
ah.h
esp_var.h
esp.h
ipcomp_var.h
ipcomp.h
ipsec6.h Remove now unused mtag argument from ipsec*_common_input_cb. 2014-12-11 17:14:49 +00:00
ipsec_input.c Fix handling of scoped IPv6 addresses in IPSec code. 2015-04-18 16:46:31 +00:00
ipsec_mbuf.c Remove route chaching support from ipsec code. It isn't used for some time. 2014-12-02 04:20:50 +00:00
ipsec_output.c Fix handling of scoped IPv6 addresses in IPSec code. 2015-04-18 16:46:31 +00:00
ipsec.c Rename ip4_def_policy variable to def_policy. It is used by both IPv4 and 2014-12-24 18:34:56 +00:00
ipsec.h Fix possible memory leak and several races in the IPsec policy management 2015-02-24 10:35:07 +00:00
key_debug.c Rename ip4_def_policy variable to def_policy. It is used by both IPv4 and 2014-12-24 18:34:56 +00:00
key_debug.h Remove __P() macro. 2014-12-03 04:08:41 +00:00
key_var.h
key.c Fix handling of scoped IPv6 addresses in IPSec code. 2015-04-18 16:46:31 +00:00
key.h Remove __P() macro. 2014-12-03 04:08:41 +00:00
keydb.h Remove __P() macro. 2014-12-03 04:08:41 +00:00
keysock.c In order to reduce use of M_EXT outside of the mbuf allocator and 2015-01-06 12:59:37 +00:00
keysock.h Remove __P() macro. 2014-12-03 04:08:41 +00:00
xform_ah.c Remove now unused mtag argument from ipsec*_common_input_cb. 2014-12-11 17:14:49 +00:00
xform_esp.c Remove now unused mtag argument from ipsec*_common_input_cb. 2014-12-11 17:14:49 +00:00
xform_ipcomp.c Remove now unused mtag argument from ipsec*_common_input_cb. 2014-12-11 17:14:49 +00:00
xform_tcp.c Remove route chaching support from ipsec code. It isn't used for some time. 2014-12-02 04:20:50 +00:00
xform.h Remove xform_ipip.c and code related to XF_IP4. 2015-04-18 16:38:45 +00:00