sync with OpenBSD -current

This commit is contained in:
purplerain 2024-04-19 22:45:12 +00:00
parent f21e607a91
commit df63f5284d
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
19 changed files with 73 additions and 286 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: in_pcb.c,v 1.301 2024/04/17 20:48:51 bluhm Exp $ */
/* $OpenBSD: in_pcb.c,v 1.302 2024/04/19 10:13:58 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@ -592,7 +592,6 @@ in_pcbdetach(struct inpcb *inp)
* points.
*/
sofree(so, 1);
m_freem(inp->inp_options);
if (inp->inp_route.ro_rt) {
rtfree(inp->inp_route.ro_rt);
inp->inp_route.ro_rt = NULL;
@ -603,8 +602,10 @@ in_pcbdetach(struct inpcb *inp)
ip6_freemoptions(inp->inp_moptions6);
} else
#endif
{
m_freem(inp->inp_options);
ip_freemoptions(inp->inp_moptions);
}
#if NPF > 0
pf_remove_divert_state(inp);
pf_inp_unlink(inp);

View file

@ -1,4 +1,4 @@
/* $OpenBSD: in_pcb.h,v 1.156 2024/04/17 20:48:51 bluhm Exp $ */
/* $OpenBSD: in_pcb.h,v 1.157 2024/04/19 10:13:58 bluhm Exp $ */
/* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */
/*
@ -157,8 +157,10 @@ struct inpcb {
} inp_hu;
#define inp_ip inp_hu.hu_ip
#define inp_ipv6 inp_hu.hu_ipv6
struct mbuf *inp_options; /* IP options */
struct ip6_pktopts *inp_outputopts6; /* IP6 options for outgoing packets */
union {
struct mbuf *inp_options; /* IPv4 options */
struct ip6_pktopts *inp_outputopts6; /* IPv6 options */
};
int inp_hops;
union {
struct ip_moptions *mou_mo;