diff options
author | Mark Johnston <markj@FreeBSD.org> | 2023-02-03 15:57:37 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2023-02-03 16:48:25 +0000 |
commit | 2589ec0f365777faacf36bd1eb24706538836b17 (patch) | |
tree | e31dbd175e2ec6a97a45276b3e96703be1b97a79 /sys/netinet/in_pcb.c | |
parent | b0ccf53f2455ad300b8b784c4b1a91a5733e890f (diff) | |
download | src-2589ec0f365777faacf36bd1eb24706538836b17.tar.gz src-2589ec0f365777faacf36bd1eb24706538836b17.zip |
pcb: Move an assignment into in_pcbdisconnect()
All callers of in_pcbdisconnect() clear the local address, so let's just
do that in the function itself.
Note that the inp's local address is not a parameter to the inp hash
functions. No functional change intended.
Reviewed by: glebius
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D38362
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index ce8a58883be4..954fe5482076 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1460,6 +1460,7 @@ in_pcbdisconnect(struct inpcb *inp) INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); + inp->inp_laddr.s_addr = INADDR_ANY; inp->inp_faddr.s_addr = INADDR_ANY; inp->inp_fport = 0; in_pcbrehash(inp); |