sync with OpenBSD -current

This commit is contained in:
purplerain 2024-05-21 00:16:53 +00:00
parent 57ecf9bd1d
commit b5356a44af
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
156 changed files with 3600 additions and 2644 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ip_ipip.c,v 1.101 2024/02/11 01:27:45 bluhm Exp $ */
/* $OpenBSD: ip_ipip.c,v 1.102 2024/05/17 20:44:36 bluhm Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@ -481,7 +481,7 @@ ipip_output(struct mbuf **mp, struct tdb *tdb)
ip6o->ip6_vfc &= ~IPV6_VERSION_MASK;
ip6o->ip6_vfc |= IPV6_VERSION;
ip6o->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6o));
ip6o->ip6_hlim = ip_defttl;
ip6o->ip6_hlim = ip6_defhlim;
in6_embedscope(&ip6o->ip6_src, &tdb->tdb_src.sin6, NULL, NULL);
in6_embedscope(&ip6o->ip6_dst, &tdb->tdb_dst.sin6, NULL, NULL);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ip_output.c,v 1.398 2024/04/17 20:48:51 bluhm Exp $ */
/* $OpenBSD: ip_output.c,v 1.399 2024/05/16 13:01:04 bluhm Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@ -428,8 +428,9 @@ sendit:
#endif
#ifdef IPSEC
if (ipsec_in_use && (flags & IP_FORWARDING) && (ipforwarding == 2) &&
(m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL) == NULL)) {
if ((flags & IP_FORWARDING) && ipforwarding == 2 &&
(!ipsec_in_use ||
m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL) == NULL)) {
error = EHOSTUNREACH;
goto bad;
}