search for: pick_port_bind

Displaying 4 results from an estimated 4 matches for "pick_port_bind".

2010 Mar 04
1
Making tftpd (hpa) firewall frienldy
...+905,14 @@ syslog(LOG_ERR, "socket: %m"); exit(EX_IOERR); } + { int x = 1; setsockopt (peer, SOL_SOCKET, SO_REUSEADDR, &x, sizeof (x)); } +#ifdef SO_REUSEPORT + { int x = 1; setsockopt (peer, SOL_SOCKET, SO_REUSEPORT , &x, sizeof (x)); } +#endif + if (pick_port_bind(peer, &myaddr, portrange_from, portrange_to) < 0) { + syslog(LOG_ERR, "bind: %m"); + exit(EX_IOERR); + } /* Set up the supplementary group access list if possible */ /* /etc/group still need to be accessible at this point */ @@ -947,10 +960,6 @@ }...
2017 Jan 29
2
[PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
...mon/tftpsubs.h | 2 +- tftp/main.c | 9 ++++++--- tftpd/tftpd.c | 6 ++++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/common/tftpsubs.c b/common/tftpsubs.c index 8c999f66eed8..344c74b3d78c 100644 --- a/common/tftpsubs.c +++ b/common/tftpsubs.c @@ -300,7 +300,7 @@ int pick_port_bind(int sockfd, union sock_addr *myaddr, } int -set_sock_addr(char *host,union sock_addr *s, char **name) +set_sock_addr(char *host, union sock_addr *s, char **name, int ai_flags) { struct addrinfo *addrResult; struct addrinfo hints; @@ -308,7 +308,7 @@ set_sock_addr(char *host,union so...
2017 Feb 02
0
Bug#771441: [PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
...| 9 ++++++--- > tftpd/tftpd.c | 6 ++++-- > 4 files changed, 13 insertions(+), 8 deletions(-) > > diff --git a/common/tftpsubs.c b/common/tftpsubs.c > index 8c999f66eed8..344c74b3d78c 100644 > --- a/common/tftpsubs.c > +++ b/common/tftpsubs.c > @@ -300,7 +300,7 @@ int pick_port_bind(int sockfd, union sock_addr *myaddr, > } > > int > -set_sock_addr(char *host,union sock_addr *s, char **name) > +set_sock_addr(char *host, union sock_addr *s, char **name, int ai_flags) > { > struct addrinfo *addrResult; > struct addrinfo hints; > @@ -308,...
2017 Feb 02
2
Bug#771441: [PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
...| 6 ++++-- > > 4 files changed, 13 insertions(+), 8 deletions(-) > > > > diff --git a/common/tftpsubs.c b/common/tftpsubs.c > > index 8c999f66eed8..344c74b3d78c 100644 > > --- a/common/tftpsubs.c > > +++ b/common/tftpsubs.c > > @@ -300,7 +300,7 @@ int pick_port_bind(int sockfd, union sock_addr *myaddr, > > } > > > > int > > -set_sock_addr(char *host,union sock_addr *s, char **name) > > +set_sock_addr(char *host, union sock_addr *s, char **name, int ai_flags) > > { > > struct addrinfo *addrResult; > >...