sync with OpenBSD -current

This commit is contained in:
purplerain 2024-07-16 03:02:11 +00:00
parent bc7421a947
commit 4cca26dc5a
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
120 changed files with 4168 additions and 640 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: if.c,v 1.719 2024/06/20 19:25:42 bluhm Exp $ */
/* $OpenBSD: if.c,v 1.720 2024/07/14 18:53:39 bluhm Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@ -3353,6 +3353,7 @@ ifnewlladdr(struct ifnet *ifp)
{
#ifdef INET6
struct ifaddr *ifa;
int i_am_router = (atomic_load_int(&ip6_forwarding) != 0);
#endif
struct ifreq ifrq;
short up;
@ -3378,7 +3379,7 @@ ifnewlladdr(struct ifnet *ifp)
* Update the link-local address. Don't do it if we're
* a router to avoid confusing hosts on the network.
*/
if (ip6_forwarding == 0) {
if (!i_am_router) {
ifa = &in6ifa_ifpforlinklocal(ifp, 0)->ia_ifa;
if (ifa) {
in6_purgeaddr(ifa);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pf.c,v 1.1202 2024/07/12 09:25:27 bluhm Exp $ */
/* $OpenBSD: pf.c,v 1.1203 2024/07/14 18:53:39 bluhm Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@ -7988,7 +7988,7 @@ done:
if (pd.dir == PF_IN) {
int flags = IPV6_REDIRECT;
switch (ip6_forwarding) {
switch (atomic_load_int(&ip6_forwarding)) {
case 2:
SET(flags, IPV6_FORWARDING_IPSEC);
/* FALLTHROUGH */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: pf_norm.c,v 1.232 2024/07/04 12:50:08 bluhm Exp $ */
/* $OpenBSD: pf_norm.c,v 1.233 2024/07/14 18:53:39 bluhm Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@ -1013,7 +1013,7 @@ pf_refragment6(struct mbuf **m0, struct m_tag *mtag, struct sockaddr_in6 *dst,
if (ifp == NULL) {
int flags = 0;
switch (ip6_forwarding) {
switch (atomic_load_int(&ip6_forwarding)) {
case 2:
SET(flags, IPV6_FORWARDING_IPSEC);
/* FALLTHROUGH */