Displaying 9 results from an estimated 9 matches for "ai_fam".
2017 Jan 29
2
[PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
...ck_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 sock_addr *s, char **name)
memset(&hints, 0, sizeof(hints));
hints.ai_family = s->sa.sa_family;
- hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+ hints.ai_flags = ai_flags;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
err = getaddrinfo(strip_address(host), NULL, &hints, &addrResult);
diff --git a/common/tftpsubs.h b/co...
2017 Feb 02
0
Bug#771441: [PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
..._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 sock_addr *s, char **name)
>
> memset(&hints, 0, sizeof(hints));
> hints.ai_family = s->sa.sa_family;
> - hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
> + hints.ai_flags = ai_flags;
> hints.ai_socktype = SOCK_DGRAM;
> hints.ai_protocol = IPPROTO_UDP;
> err = getaddrinfo(strip_address(host), NULL, &hints, &addrResult);
> diff...
2009 Sep 05
5
[tftpd PATCH 0/5] pidfile option and syslog fix
Hi,
This is my current patch queue. The patches are independent, AFAIK,
so feel free to cherry-pick or reject them independently.
The bottom one was needed for a successful build here; the top one
contains all the modifications you requested on IRC, and more.
Meanwhile I hit one of the four stray TABs in tftpd.c, and decided to
get rid of them.
Comments welcome.
---
Ferenc Wagner (5):
2009 Jul 04
2
[PATCH] Create /var/run/tftpd-hpa.pid in standalone mode
...a/tftpd/tftpd.c b/tftpd/tftpd.c
index 1f5d9d6..18896c9 100644
--- a/tftpd/tftpd.c
+++ b/tftpd/tftpd.c
@@ -517,6 +517,7 @@ int main(int argc, char **argv)
/* If we're running standalone, set up the input port */
if (standalone) {
+ FILE *pidfile;
#ifdef HAVE_IPV6
if (ai_fam != AF_INET6) {
#endif
@@ -702,6 +703,12 @@ int main(int argc, char **argv)
syslog(LOG_ERR, "cannot daemonize: %m");
exit(EX_OSERR);
}
+ pidfile = fopen ("/var/run/tfpd-hpa.pid","w");
+ if (!pidfile
+ || fprintf(pidf...
2009 Jul 19
0
[PATCH] Untabify tftpd.c
...--- a/tftpd/tftpd.c
+++ b/tftpd/tftpd.c
@@ -364,7 +364,7 @@ int main(int argc, char **argv)
srand(time(NULL) ^ getpid());
while ((c = getopt_long(argc, argv, short_options, long_options, NULL))
- != -1)
+ != -1)
switch (c) {
case '4':
ai_fam = AF_INET;
@@ -467,9 +467,9 @@ int main(int argc, char **argv)
case 'v':
verbosity++;
break;
- case OPT_VERBOSITY:
- verbosity = atoi(optarg);
- break;
+ case OPT_VERBOSITY:
+ verbosity = atoi(optarg);
+ break;...
2014 Jul 31
0
[PATCH 1/3] __progname is provided by libc
...006 (Closes: #564052).
Signed-off-by: Ron Lee <ron at debian.org>
---
tftpd/tftpd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
index 88d2812..91f5ae1 100644
--- a/tftpd/tftpd.c
+++ b/tftpd/tftpd.c
@@ -76,7 +76,7 @@ static int ai_fam = AF_INET;
#define TRIES 6 /* Number of attempts to send each packet */
#define TIMEOUT_LIMIT ((1 << TRIES)-1)
-const char *__progname;
+const char *tftpd_progname;
static int peer;
static unsigned long timeout = TIMEOUT; /* Current timeout value */
static unsig...
2009 Jul 19
3
[PATCH] tftpd.c: write a pid file in standalone mode
...ask);
-
#ifdef WITH_REGEX
if (rewrite_file)
rewrite_rules = read_remap_rules(rewrite_file);
@@ -517,6 +526,7 @@ int main(int argc, char **argv)
/* If we're running standalone, set up the input port */
if (standalone) {
+ FILE *pf;
#ifdef HAVE_IPV6
if (ai_fam != AF_INET6) {
#endif
@@ -702,6 +712,14 @@ int main(int argc, char **argv)
syslog(LOG_ERR, "cannot daemonize: %m");
exit(EX_OSERR);
}
+ set_signal(SIGTERM, handle_exit, 0);
+ set_signal(SIGINT, handle_exit, 0);
+ pf = fopen (pidfil...
2017 Feb 02
2
Bug#771441: [PATCH tftpd-hpa] tftpd: don't use AI_CANONNAME and AI_ADDRCONFIG to resolve addresses for bind
...s, char **name, int ai_flags)
> > {
> > struct addrinfo *addrResult;
> > struct addrinfo hints;
> > @@ -308,7 +308,7 @@ set_sock_addr(char *host,union sock_addr *s, char **name)
> >
> > memset(&hints, 0, sizeof(hints));
> > hints.ai_family = s->sa.sa_family;
> > - hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
> > + hints.ai_flags = ai_flags;
> > hints.ai_socktype = SOCK_DGRAM;
> > hints.ai_protocol = IPPROTO_UDP;
> > err = getaddrinfo(strip_address(host), NULL, &hints, &am...
2014 Jul 31
5
[PATCH 0/3] tftp-hpa patches from Debian
From: Ron <ron at debian.org>
Hi,
I've just taken over maintaining the packages for this in Debian,
and we've been carrying a couple of patches for a while now that
really should have been forwarded since they're clearly not distro
specific. I added a third one to that yesterday to fix another
autoconf build 'race' seen when doing parallel builds.
Cheers,
Ron