inpcb: Fix the GENERIC-NODEBUG build
Fixes:01f8ce8324("inpcb: Factor out parts of in6_pcbbind() and in_pcbbind_setup()") (cherry picked from commitffb3d384fc)
This commit is contained in:
parent
eecdd412ff
commit
5ada29ab25
2 changed files with 2 additions and 4 deletions
|
|
@ -964,7 +964,6 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp,
|
|||
u_short *lportp, struct ucred *cred)
|
||||
{
|
||||
struct socket *so = inp->inp_socket;
|
||||
struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
|
||||
struct in_addr laddr;
|
||||
u_short lport = 0;
|
||||
int lookupflags, sooptions;
|
||||
|
|
@ -974,7 +973,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp,
|
|||
* No state changes, so read locks are sufficient here.
|
||||
*/
|
||||
INP_LOCK_ASSERT(inp);
|
||||
INP_HASH_LOCK_ASSERT(pcbinfo);
|
||||
INP_HASH_LOCK_ASSERT(inp->inp_pcbinfo);
|
||||
|
||||
laddr.s_addr = *laddrp;
|
||||
if (sin != NULL && laddr.s_addr != INADDR_ANY)
|
||||
|
|
|
|||
|
|
@ -300,12 +300,11 @@ int
|
|||
in6_pcbbind(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred)
|
||||
{
|
||||
struct socket *so = inp->inp_socket;
|
||||
struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
|
||||
u_short lport = 0;
|
||||
int error, lookupflags, sooptions;
|
||||
|
||||
INP_WLOCK_ASSERT(inp);
|
||||
INP_HASH_WLOCK_ASSERT(pcbinfo);
|
||||
INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo);
|
||||
|
||||
if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
|
||||
return (EINVAL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue