diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-01-28 20:34:26 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-01-28 20:34:26 +0000 |
commit | 8a7b6b6004f3eb0b6a4209b412a5371526bc7e6d (patch) | |
tree | e36a5dfd3813c7797aac03d68d444e05b82a881c /sys/netinet/tcp_subr.c | |
parent | 6a571adde7d27d1d3cc5e316429dd65e4e6e5232 (diff) |
Use more specific sockaddr type for inpcb notify.
in_pcbnotifyall() is an IPv4 only function. All callers check that
sockaddr dst is in fact a sockaddr_in. Pass the more spcific type
and remove the runtime check at beginning of in_pcbnotifyall().
Use const sockaddr_in in in_pcbnotifyall() and const sockaddr_in6
in6_pcbnotify() as dst parameter.
OK millert@
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 8b5982a018e..f7616f4da08 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.196 2024/01/27 21:13:46 bluhm Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.197 2024/01/28 20:34:25 bluhm Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -833,7 +833,7 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, u_int rdomain, void *v) } in_pcbunref(inp); } else - in_pcbnotifyall(&tcbtable, sa, rdomain, errno, notify); + in_pcbnotifyall(&tcbtable, satosin(sa), rdomain, errno, notify); } |