* Fix a bug in the -p handling that made it opt-out instead of opt-in.
* Don’t bother using AF_UNIX, it doesn’t have ports.
This commit is contained in:
parent
01e8f8ce00
commit
a13b641301
11
src/fd.c
11
src/fd.c
@ -99,14 +99,14 @@ void _zz_exclude(char const *regex)
|
||||
#endif
|
||||
}
|
||||
|
||||
void _zz_ports(char const *list)
|
||||
void _zz_ports(char const *portlist)
|
||||
{
|
||||
ports = _zz_allocrange(list, static_ports);
|
||||
ports = _zz_allocrange(portlist, static_ports);
|
||||
}
|
||||
|
||||
void _zz_list(char const *list)
|
||||
void _zz_list(char const *fdlist)
|
||||
{
|
||||
list = _zz_allocrange(list, static_list);
|
||||
list = _zz_allocrange(fdlist, static_list);
|
||||
}
|
||||
|
||||
void _zz_setseed(int32_t s)
|
||||
@ -228,6 +228,9 @@ int _zz_iswatched(int fd)
|
||||
|
||||
int _zz_portwatched(int port)
|
||||
{
|
||||
if(!ports)
|
||||
return 1;
|
||||
|
||||
return _zz_isinrange(port, ports);
|
||||
}
|
||||
|
||||
|
||||
@ -209,9 +209,6 @@ int NEW(bind)(int sockfd, const struct sockaddr *my_addr, SOCKLEN_T addrlen)
|
||||
case AF_INET:
|
||||
#if defined AF_INET6
|
||||
case AF_INET6:
|
||||
#endif
|
||||
#if defined AF_UNIX
|
||||
case AF_UNIX:
|
||||
#endif
|
||||
case AF_UNSPEC:
|
||||
port = ntohs(in->sin_port);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user