mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
inpcb: do not set INP_ANONPORT until successful operation
This commit is contained in:
1 parent
a48a275325
commit
ca4eb3f398
1 file changed
+2
-2
@@ -132,8 +132,6 @@ in6_pcbsetport_locked(struct in6_addr *laddr, struct inpcb *inp,
|
||||
if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT|SO_REUSEPORT_LB)) == 0)
|
||||
lookupflags = INPLOOKUP_WILDCARD;
|
||||
|
||||
inp->inp_flags |= INP_ANONPORT;
|
||||
|
||||
error = in_pcb_lport(inp, NULL, &lport, cred, lookupflags);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
@@ -145,6 +143,8 @@ in6_pcbsetport_locked(struct in6_addr *laddr, struct inpcb *inp,
|
||||
return (EAGAIN);
|
||||
}
|
||||
|
||||
inp->inp_flags |= INP_ANONPORT;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user