Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qpipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ int CheckIpPermission(struct sockaddr_in * pIp, PROG_ARGS * qpipe_args)
netmask = GetMaskByLen(qpipe_args->masklen[i]);
netmask = htonl(netmask);

if ( (pIp->sin_addr.s_addr & netmask) == qpipe_args->netip[i])
if ( ((pIp->sin_addr.s_addr)&netmask) == ((qpipe_args->netip[i]) &netmask) )
{
return 1;
}
Expand Down