diff options
author | Bernhard Reutner-Fischer | 2006-04-12 18:24:37 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-04-12 18:24:37 +0000 |
commit | 67f641e75b685abe1588b634b409c1ee2ff68c22 (patch) | |
tree | 74b3e38f1b7caef23bbf06a92b6e5d05530d50a6 /networking/dnsd.c | |
parent | 2c99851181a652358aa3ca58ef38c57e46ae02e4 (diff) | |
download | busybox-67f641e75b685abe1588b634b409c1ee2ff68c22.zip busybox-67f641e75b685abe1588b634b409c1ee2ff68c22.tar.gz |
- patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()
Diffstat (limited to 'networking/dnsd.c')
-rw-r--r-- | networking/dnsd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c index d78ea04..b9d0221 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c @@ -216,9 +216,8 @@ listen_socket(char *iface_addr, int listen_port) a.sin_family = AF_INET; if (!inet_aton(iface_addr, &a.sin_addr)) bb_perror_msg_and_die("bad iface address"); - if (bind(s, (struct sockaddr *)&a, sizeof(a)) < 0) - bb_perror_msg_and_die("bind() failed"); - listen(s, 50); + bb_xbind(s, (struct sockaddr *)&a, sizeof(a)); + listen(s, 50); /* bb_xlisten? */ sprintf(msg, "accepting UDP packets on addr:port %s:%d\n", iface_addr, (int)listen_port); log_message(LOG_FILE, msg); |