Remove redundant test, we know inp_lport is 0.
MFC after: 1 week
This commit is contained in:
parent
d6a55c6d3f
commit
5cd3dcaa25
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245914
@ -334,8 +334,7 @@ in_pcbbind(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred)
|
||||
|
||||
if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY)
|
||||
return (EINVAL);
|
||||
anonport = inp->inp_lport == 0 && (nam == NULL ||
|
||||
((struct sockaddr_in *)nam)->sin_port == 0);
|
||||
anonport = nam == NULL || ((struct sockaddr_in *)nam)->sin_port == 0;
|
||||
error = in_pcbbind_setup(inp, nam, &inp->inp_laddr.s_addr,
|
||||
&inp->inp_lport, cred);
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user