-/* $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 $ */
/*
* 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;
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);
-/* $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 $ */
/*
} 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;