aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/packet.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-22 23:22:06 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-22 23:22:06 +0000
commit48237b0c88343154d58854020c3a9c8b07c61b10 (patch)
treeb36bc84f22dd797b45c8d665e50e2f6c690e1370 /networking/udhcp/packet.c
parentb40bdb383a6b7a7f0fd36d0b1cc24deb42cd5f0d (diff)
downloadbusybox-48237b0c88343154d58854020c3a9c8b07c61b10.tar.gz
introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
use them where appropriate. 200 bytes saved
Diffstat (limited to 'networking/udhcp/packet.c')
-rw-r--r--networking/udhcp/packet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c
index 85910447b..dec9d0ab3 100644
--- a/networking/udhcp/packet.c
+++ b/networking/udhcp/packet.c
@@ -173,7 +173,6 @@ int udhcp_kernel_packet(struct dhcpMessage *payload,
uint32_t source_ip, int source_port,
uint32_t dest_ip, int dest_port)
{
- int n = 1;
int fd, result;
struct sockaddr_in client;
@@ -181,7 +180,7 @@ int udhcp_kernel_packet(struct dhcpMessage *payload,
if (fd < 0)
return -1;
- if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &n, sizeof(n)) == -1) {
+ if (setsockopt_reuseaddr(fd) == -1) {
close(fd);
return -1;
}