sync with OpenBSD -current

This commit is contained in:
purplerain 2024-07-05 02:44:07 +00:00
parent ff77f1c0ed
commit b8cf0a282a
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
19 changed files with 237 additions and 127 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pf.c,v 1.1200 2024/07/02 18:33:47 bluhm Exp $ */
/* $OpenBSD: pf.c,v 1.1201 2024/07/04 12:50:08 bluhm Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@ -7986,14 +7986,20 @@ done:
break;
case AF_INET6:
if (pd.dir == PF_IN) {
int flags;
int flags = IPV6_REDIRECT;
if (ip6_forwarding == 0) {
switch (ip6_forwarding) {
case 2:
SET(flags, IPV6_FORWARDING_IPSEC);
/* FALLTHROUGH */
case 1:
SET(flags, IPV6_FORWARDING);
break;
default:
ip6stat_inc(ip6s_cantforward);
action = PF_DROP;
goto out;
}
flags = IPV6_FORWARDING | IPV6_REDIRECT;
ip6_forward(pd.m, NULL, flags);
} else
ip6_output(pd.m, NULL, NULL, 0, NULL, NULL);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pf_norm.c,v 1.231 2024/06/20 19:25:42 bluhm Exp $ */
/* $OpenBSD: pf_norm.c,v 1.232 2024/07/04 12:50:08 bluhm Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@ -1011,7 +1011,20 @@ pf_refragment6(struct mbuf **m0, struct m_tag *mtag, struct sockaddr_in6 *dst,
while ((m = ml_dequeue(&ml)) != NULL) {
m->m_pkthdr.pf.flags |= PF_TAG_REFRAGMENTED;
if (ifp == NULL) {
ip6_forward(m, NULL, IPV6_FORWARDING);
int flags = 0;
switch (ip6_forwarding) {
case 2:
SET(flags, IPV6_FORWARDING_IPSEC);
/* FALLTHROUGH */
case 1:
SET(flags, IPV6_FORWARDING);
break;
default:
ip6stat_inc(ip6s_cantforward);
return (PF_DROP);
}
ip6_forward(m, NULL, flags);
} else if ((u_long)m->m_pkthdr.len <= ifp->if_mtu) {
ifp->if_output(ifp, m, sin6tosa(dst), rt);
} else {