sync with OpenBSD -current
This commit is contained in:
parent
1bc98b3538
commit
388947454d
30 changed files with 670 additions and 327 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_etherip.c,v 1.51 2023/09/16 09:33:27 mpi Exp $ */
|
||||
/* $OpenBSD: if_etherip.c,v 1.52 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2015 Kazuya GODA <goda@openbsd.org>
|
||||
*
|
||||
|
@ -422,11 +422,11 @@ etherip_set_tunnel(struct etherip_softc *sc, struct if_laddrreq *req)
|
|||
IN6_IS_ADDR_MULTICAST(&dst6->sin6_addr))
|
||||
return (EINVAL);
|
||||
|
||||
error = in6_embedscope(&sc->sc_tunnel.t_src6, src6, NULL);
|
||||
error = in6_embedscope(&sc->sc_tunnel.t_src6, src6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
error = in6_embedscope(&sc->sc_tunnel.t_dst6, dst6, NULL);
|
||||
error = in6_embedscope(&sc->sc_tunnel.t_dst6, dst6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_gif.c,v 1.133 2021/05/16 15:10:20 deraadt Exp $ */
|
||||
/* $OpenBSD: if_gif.c,v 1.134 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -687,11 +687,11 @@ gif_set_tunnel(struct gif_softc *sc, struct if_laddrreq *req)
|
|||
if (IN6_IS_ADDR_MULTICAST(&dst6->sin6_addr))
|
||||
return (EINVAL);
|
||||
|
||||
error = in6_embedscope(&tunnel->t_src6, src6, NULL);
|
||||
error = in6_embedscope(&tunnel->t_src6, src6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
error = in6_embedscope(&tunnel->t_dst6, dst6, NULL);
|
||||
error = in6_embedscope(&tunnel->t_dst6, dst6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_gre.c,v 1.175 2023/10/27 20:56:47 jan Exp $ */
|
||||
/* $OpenBSD: if_gre.c,v 1.176 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -2379,7 +2379,7 @@ mgre_set_tunnel(struct mgre_softc *sc, struct if_laddrreq *req)
|
|||
IN6_IS_ADDR_MULTICAST(&addr6->sin6_addr))
|
||||
return (EINVAL);
|
||||
|
||||
error = in6_embedscope(&tunnel->t_src6, addr6, NULL);
|
||||
error = in6_embedscope(&tunnel->t_src6, addr6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
@ -3122,11 +3122,11 @@ gre_set_tunnel(struct gre_tunnel *tunnel, struct if_laddrreq *req, int ucast)
|
|||
if (src6->sin6_scope_id != dst6->sin6_scope_id)
|
||||
return (EINVAL);
|
||||
|
||||
error = in6_embedscope(&tunnel->t_src6, src6, NULL);
|
||||
error = in6_embedscope(&tunnel->t_src6, src6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
error = in6_embedscope(&tunnel->t_dst6, dst6, NULL);
|
||||
error = in6_embedscope(&tunnel->t_dst6, dst6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
@ -3609,7 +3609,7 @@ nvgre_add_addr(struct nvgre_softc *sc, const struct ifbareq *ifba)
|
|||
if (src6.sin6_scope_id != sin6->sin6_scope_id)
|
||||
return (EADDRNOTAVAIL);
|
||||
|
||||
error = in6_embedscope(&endpoint.in6, sin6, NULL);
|
||||
error = in6_embedscope(&endpoint.in6, sin6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: if_vxlan.c,v 1.95 2023/11/18 00:23:38 dlg Exp $ */
|
||||
/* $OpenBSD: if_vxlan.c,v 1.96 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2021 David Gwynne <dlg@openbsd.org>
|
||||
|
@ -1385,12 +1385,12 @@ vxlan_set_tunnel(struct vxlan_softc *sc, const struct if_laddrreq *req)
|
|||
/* all good */
|
||||
mode = IN6_IS_ADDR_MULTICAST(&dst6->sin6_addr) ?
|
||||
VXLAN_TMODE_LEARNING : VXLAN_TMODE_P2P;
|
||||
error = in6_embedscope(&daddr.in6, dst6, NULL);
|
||||
error = in6_embedscope(&daddr.in6, dst6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
}
|
||||
|
||||
error = in6_embedscope(&saddr.in6, src6, NULL);
|
||||
error = in6_embedscope(&saddr.in6, src6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
@ -1703,7 +1703,7 @@ vxlan_add_addr(struct vxlan_softc *sc, const struct ifbareq *ifba)
|
|||
if (sin6->sin6_port != htons(0))
|
||||
return (EADDRNOTAVAIL);
|
||||
|
||||
error = in6_embedscope(&endpoint.in6, sin6, NULL);
|
||||
error = in6_embedscope(&endpoint.in6, sin6, NULL, NULL);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: pfkeyv2_convert.c,v 1.82 2023/10/11 22:13:16 tobhe Exp $ */
|
||||
/* $OpenBSD: pfkeyv2_convert.c,v 1.83 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/*
|
||||
* The author of this code is Angelos D. Keromytis (angelos@keromytis.org)
|
||||
*
|
||||
|
@ -484,10 +484,8 @@ import_flow(struct sockaddr_encap *flow, struct sockaddr_encap *flowmask,
|
|||
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
in6_embedscope(&src->sin6.sin6_addr, &src->sin6,
|
||||
NULL);
|
||||
in6_embedscope(&dst->sin6.sin6_addr, &dst->sin6,
|
||||
NULL);
|
||||
in6_embedscope(&src->sin6.sin6_addr, &src->sin6, NULL, NULL);
|
||||
in6_embedscope(&dst->sin6.sin6_addr, &dst->sin6, NULL, NULL);
|
||||
|
||||
/* netmask handling */
|
||||
rt_maskedcopy(&src->sa, &src->sa, &srcmask->sa);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: pipex.c,v 1.149 2023/09/16 09:33:27 mpi Exp $ */
|
||||
/* $OpenBSD: pipex.c,v 1.150 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009 Internet Initiative Japan Inc.
|
||||
|
@ -1920,8 +1920,7 @@ pipex_l2tp_output(struct mbuf *m0, struct pipex_session *session)
|
|||
ip6->ip6_vfc |= IPV6_VERSION;
|
||||
ip6->ip6_nxt = IPPROTO_UDP;
|
||||
ip6->ip6_src = session->local.sin6.sin6_addr;
|
||||
(void)in6_embedscope(&ip6->ip6_dst,
|
||||
&session->peer.sin6, NULL);
|
||||
in6_embedscope(&ip6->ip6_dst, &session->peer.sin6, NULL, NULL);
|
||||
/* ip6->ip6_plen will be filled in ip6_output. */
|
||||
|
||||
ip6_send(m0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue