sync with OpenBSD -current
This commit is contained in:
parent
9fbd947ba3
commit
8873eac723
33 changed files with 1109 additions and 413 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: in6_pcb.c,v 1.126 2023/11/29 18:30:48 bluhm Exp $ */
|
||||
/* $OpenBSD: in6_pcb.c,v 1.128 2023/12/01 15:30:47 bluhm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -245,7 +245,8 @@ in6_pcbaddrisavail(struct inpcb *inp, struct sockaddr_in6 *sin6, int wild,
|
|||
int
|
||||
in6_pcbconnect(struct inpcb *inp, struct mbuf *nam)
|
||||
{
|
||||
struct in6_addr *in6a = NULL;
|
||||
struct inpcbtable *table = inp->inp_table;
|
||||
const struct in6_addr *in6a;
|
||||
struct sockaddr_in6 *sin6;
|
||||
struct inpcb *t;
|
||||
int error;
|
||||
|
@ -312,6 +313,10 @@ in6_pcbconnect(struct inpcb *inp, struct mbuf *nam)
|
|||
}
|
||||
inp->inp_faddr6 = sin6->sin6_addr;
|
||||
inp->inp_fport = sin6->sin6_port;
|
||||
mtx_enter(&table->inpt_mtx);
|
||||
in_pcbrehash(inp);
|
||||
mtx_leave(&table->inpt_mtx);
|
||||
|
||||
inp->inp_flowinfo &= ~IPV6_FLOWLABEL_MASK;
|
||||
if (ip6_auto_flowlabel)
|
||||
inp->inp_flowinfo |=
|
||||
|
@ -320,7 +325,6 @@ in6_pcbconnect(struct inpcb *inp, struct mbuf *nam)
|
|||
inp->inp_flowid = stoeplitz_ip6port(&inp->inp_faddr6,
|
||||
&inp->inp_laddr6, inp->inp_fport, inp->inp_lport);
|
||||
#endif
|
||||
in_pcbrehash(inp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: in6_src.c,v 1.87 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/* $OpenBSD: in6_src.c,v 1.88 2023/12/01 14:08:04 bluhm Exp $ */
|
||||
/* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -91,7 +91,7 @@ int in6_selectif(struct sockaddr_in6 *, struct ip6_pktopts *,
|
|||
* the values set at pcb level can be overridden via cmsg.
|
||||
*/
|
||||
int
|
||||
in6_pcbselsrc(struct in6_addr **in6src, struct sockaddr_in6 *dstsock,
|
||||
in6_pcbselsrc(const struct in6_addr **in6src, struct sockaddr_in6 *dstsock,
|
||||
struct inpcb *inp, struct ip6_pktopts *opts)
|
||||
{
|
||||
struct ip6_moptions *mopts = inp->inp_moptions6;
|
||||
|
@ -249,7 +249,7 @@ in6_pcbselsrc(struct in6_addr **in6src, struct sockaddr_in6 *dstsock,
|
|||
* an entry to the caller for later use.
|
||||
*/
|
||||
int
|
||||
in6_selectsrc(struct in6_addr **in6src, struct sockaddr_in6 *dstsock,
|
||||
in6_selectsrc(const struct in6_addr **in6src, struct sockaddr_in6 *dstsock,
|
||||
struct ip6_moptions *mopts, unsigned int rtableid)
|
||||
{
|
||||
struct ifnet *ifp = NULL;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: ip6_output.c,v 1.281 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/* $OpenBSD: ip6_output.c,v 1.282 2023/12/01 15:30:47 bluhm Exp $ */
|
||||
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -1381,12 +1381,7 @@ do { \
|
|||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
if (inp->inp_lport) {
|
||||
error = EBUSY;
|
||||
break;
|
||||
}
|
||||
inp->inp_rtableid = rtid;
|
||||
in_pcbrehash(inp);
|
||||
error = in_pcbset_rtableid(inp, rtid);
|
||||
break;
|
||||
case IPV6_PIPEX:
|
||||
if (m != NULL && m->m_len == sizeof(int))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: ip6_var.h,v 1.107 2023/11/26 22:08:10 bluhm Exp $ */
|
||||
/* $OpenBSD: ip6_var.h,v 1.108 2023/12/01 14:08:04 bluhm Exp $ */
|
||||
/* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -365,9 +365,9 @@ int rip6_sysctl(int *, u_int, void *, size_t *, void *, size_t);
|
|||
int dest6_input(struct mbuf **, int *, int, int);
|
||||
int none_input(struct mbuf **, int *, int);
|
||||
|
||||
int in6_pcbselsrc(struct in6_addr **, struct sockaddr_in6 *,
|
||||
int in6_pcbselsrc(const struct in6_addr **, struct sockaddr_in6 *,
|
||||
struct inpcb *, struct ip6_pktopts *);
|
||||
int in6_selectsrc(struct in6_addr **, struct sockaddr_in6 *,
|
||||
int in6_selectsrc(const struct in6_addr **, struct sockaddr_in6 *,
|
||||
struct ip6_moptions *, unsigned int);
|
||||
struct rtentry *in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *,
|
||||
struct route_in6 *, unsigned int rtableid);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: raw_ip6.c,v 1.175 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/* $OpenBSD: raw_ip6.c,v 1.176 2023/12/01 14:08:04 bluhm Exp $ */
|
||||
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -451,7 +451,7 @@ rip6_output(struct mbuf *m, struct socket *so, struct sockaddr *dstaddr,
|
|||
* Source address selection.
|
||||
*/
|
||||
{
|
||||
struct in6_addr *in6a;
|
||||
const struct in6_addr *in6a;
|
||||
|
||||
error = in6_pcbselsrc(&in6a, satosin6(dstaddr), in6p, optp);
|
||||
if (error)
|
||||
|
@ -683,7 +683,7 @@ rip6_connect(struct socket *so, struct mbuf *nam)
|
|||
{
|
||||
struct inpcb *in6p = sotoinpcb(so);
|
||||
struct sockaddr_in6 *addr;
|
||||
struct in6_addr *in6a = NULL;
|
||||
const struct in6_addr *in6a;
|
||||
int error;
|
||||
|
||||
soassertlocked(so);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: udp6_output.c,v 1.61 2023/11/28 13:23:20 bluhm Exp $ */
|
||||
/* $OpenBSD: udp6_output.c,v 1.62 2023/12/01 14:08:04 bluhm Exp $ */
|
||||
/* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -101,7 +101,7 @@ udp6_output(struct inpcb *in6p, struct mbuf *m, struct mbuf *addr6,
|
|||
int error = 0, priv = 0, hlen, flags;
|
||||
struct ip6_hdr *ip6;
|
||||
struct udphdr *udp6;
|
||||
struct in6_addr *laddr, *faddr;
|
||||
const struct in6_addr *laddr, *faddr;
|
||||
struct ip6_pktopts *optp, opt;
|
||||
struct sockaddr_in6 tmp, valid;
|
||||
struct proc *p = curproc; /* XXX */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue