sync with OpenBSD -current

This commit is contained in:
purplerain 2024-06-21 00:47:47 +00:00
parent e1c03975e3
commit b7453d5ddb
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
18 changed files with 172 additions and 123 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ip_carp.c,v 1.361 2024/02/13 12:22:09 bluhm Exp $ */
/* $OpenBSD: ip_carp.c,v 1.362 2024/06/20 19:25:42 bluhm Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@ -1287,6 +1287,10 @@ carp_send_na(struct carp_softc *sc)
struct ifaddr *ifa;
struct in6_addr *in6;
static struct in6_addr mcast = IN6ADDR_LINKLOCAL_ALLNODES_INIT;
int flags = ND_NA_FLAG_OVERRIDE;
if (ip6_forwarding != 0)
flags |= ND_NA_FLAG_ROUTER;
TAILQ_FOREACH(ifa, &sc->sc_if.if_addrlist, ifa_list) {
@ -1294,9 +1298,7 @@ carp_send_na(struct carp_softc *sc)
continue;
in6 = &ifatoia6(ifa)->ia_addr.sin6_addr;
nd6_na_output(&sc->sc_if, &mcast, in6,
ND_NA_FLAG_OVERRIDE |
(ip6_forwarding ? ND_NA_FLAG_ROUTER : 0), 1, NULL);
nd6_na_output(&sc->sc_if, &mcast, in6, flags, 1, NULL);
}
}
#endif /* INET6 */

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ip_icmp.c,v 1.193 2024/06/07 18:24:16 bluhm Exp $ */
/* $OpenBSD: ip_icmp.c,v 1.194 2024/06/20 19:25:04 bluhm Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@ -589,7 +589,7 @@ reflect:
struct sockaddr_in ssrc;
struct rtentry *newrt = NULL;
if (icmp_rediraccept == 0 || ip_forwarding == 1)
if (icmp_rediraccept == 0 || ip_forwarding != 0)
goto freeit;
if (code > 3)
goto badcode;