-/* $OpenBSD: in_pcb.c,v 1.278 2023/11/12 23:19:14 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.279 2023/11/29 18:30:48 bluhm Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
continue;
#endif
if (inp->inp_faddr.s_addr != faddr.s_addr ||
- rtable_l2(inp->inp_rtableid) != rdomain ||
- inp->inp_socket == NULL) {
+ rtable_l2(inp->inp_rtableid) != rdomain) {
continue;
}
in_pcbref(inp);
-/* $OpenBSD: in_pcb.h,v 1.139 2023/11/28 13:23:20 bluhm Exp $ */
+/* $OpenBSD: in_pcb.h,v 1.140 2023/11/29 18:30:48 bluhm Exp $ */
/* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */
/*
#define inp_laddr6 inp_laddru.iau_addr6
u_int16_t inp_fport; /* foreign port */
u_int16_t inp_lport; /* local port */
- struct socket *inp_socket; /* back pointer to socket */
+ struct socket *inp_socket; /* [I] back pointer to socket */
caddr_t inp_ppcb; /* pointer to per-protocol pcb */
union { /* Route (notice increased size). */
struct route ru_route;
-/* $OpenBSD: tcp_subr.c,v 1.193 2023/11/26 22:08:10 bluhm Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.194 2023/11/29 18:30:48 bluhm Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
}
if (inp) {
seq = ntohl(th.th_seq);
- if (inp->inp_socket &&
- (tp = intotcpcb(inp)) &&
+ if ((tp = intotcpcb(inp)) &&
SEQ_GEQ(seq, tp->snd_una) &&
SEQ_LT(seq, tp->snd_max))
notify(inp, inet6ctlerrmap[cmd]);
rdomain);
if (inp) {
seq = ntohl(th->th_seq);
- if (inp->inp_socket &&
- (tp = intotcpcb(inp)) &&
+ if ((tp = intotcpcb(inp)) &&
SEQ_GEQ(seq, tp->snd_una) &&
SEQ_LT(seq, tp->snd_max))
notify(inp, errno);
-/* $OpenBSD: udp_usrreq.c,v 1.309 2023/11/28 13:23:20 bluhm Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.310 2023/11/29 18:30:48 bluhm Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
inp = in_pcblookup(&udbtable,
ip->ip_dst, uhp->uh_dport, ip->ip_src, uhp->uh_sport,
rdomain);
- if (inp && inp->inp_socket != NULL)
+ if (inp != NULL)
notify(inp, errno);
in_pcbunref(inp);
} else
-/* $OpenBSD: in6_pcb.c,v 1.125 2023/11/28 13:23:20 bluhm Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.126 2023/11/29 18:30:48 bluhm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* as usual.
*/
if (lport == 0 && fport == 0 && flowinfo &&
- inp->inp_socket != NULL &&
flowinfo == (inp->inp_flowinfo & IPV6_FLOWLABEL_MASK) &&
IN6_ARE_ADDR_EQUAL(&inp->inp_laddr6, &sa6_src.sin6_addr))
goto do_notify;
else if (!IN6_ARE_ADDR_EQUAL(&inp->inp_faddr6,
&dst->sin6_addr) ||
rtable_l2(inp->inp_rtableid) != rdomain ||
- inp->inp_socket == NULL ||
(lport && inp->inp_lport != lport) ||
(!IN6_IS_ADDR_UNSPECIFIED(&sa6_src.sin6_addr) &&
!IN6_ARE_ADDR_EQUAL(&inp->inp_laddr6,