ipsec_input.c (275707) | ipsec_input.c (281693) |
---|---|
1/* $FreeBSD: head/sys/netipsec/ipsec_input.c 275707 2014-12-11 17:14:49Z ae $ */ | 1/* $FreeBSD: head/sys/netipsec/ipsec_input.c 281693 2015-04-18 16:46:31Z ae $ */ |
2/* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ 3/*- 4 * The authors of this code are John Ioannidis (ji@tla.org), 5 * Angelos D. Keromytis (kermit@csd.uch.gr) and 6 * Niels Provos (provos@physnet.uni-hamburg.de). 7 * 8 * This code was written by John Ioannidis for BSD/OS in Athens, Greece, 9 * in November 1995. --- 180 unchanged lines hidden (view full) --- 190 break; 191#endif /* INET */ 192#ifdef INET6 193 case AF_INET6: 194 dst_address.sin6.sin6_len = sizeof(struct sockaddr_in6); 195 m_copydata(m, offsetof(struct ip6_hdr, ip6_dst), 196 sizeof(struct in6_addr), 197 (caddr_t) &dst_address.sin6.sin6_addr); | 2/* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ 3/*- 4 * The authors of this code are John Ioannidis (ji@tla.org), 5 * Angelos D. Keromytis (kermit@csd.uch.gr) and 6 * Niels Provos (provos@physnet.uni-hamburg.de). 7 * 8 * This code was written by John Ioannidis for BSD/OS in Athens, Greece, 9 * in November 1995. --- 180 unchanged lines hidden (view full) --- 190 break; 191#endif /* INET */ 192#ifdef INET6 193 case AF_INET6: 194 dst_address.sin6.sin6_len = sizeof(struct sockaddr_in6); 195 m_copydata(m, offsetof(struct ip6_hdr, ip6_dst), 196 sizeof(struct in6_addr), 197 (caddr_t) &dst_address.sin6.sin6_addr); |
198 /* We keep addresses in SADB without embedded scope id */ 199 if (IN6_IS_SCOPE_LINKLOCAL(&dst_address.sin6.sin6_addr)) { 200 /* XXX: sa6_recoverscope() */ 201 dst_address.sin6.sin6_scope_id = 202 ntohs(dst_address.sin6.sin6_addr.s6_addr16[1]); 203 dst_address.sin6.sin6_addr.s6_addr16[1] = 0; 204 } |
|
198 break; 199#endif /* INET6 */ 200 default: 201 DPRINTF(("%s: unsupported protocol family %u\n", __func__, af)); 202 m_freem(m); 203 IPSEC_ISTAT(sproto, nopf); 204 return EPFNOSUPPORT; 205 } --- 724 unchanged lines hidden --- | 205 break; 206#endif /* INET6 */ 207 default: 208 DPRINTF(("%s: unsupported protocol family %u\n", __func__, af)); 209 m_freem(m); 210 IPSEC_ISTAT(sproto, nopf); 211 return EPFNOSUPPORT; 212 } --- 724 unchanged lines hidden --- |