Displaying 5 results from an estimated 5 matches for "bootp_init_if".
2003 Apr 29
0
[PATCH] ipconfig: fix memory leak, and exit if no interfaces to configure
...changed, 25 insertions(+), 5 deletions(-)
diff -Nru a/ipconfig/main.c b/ipconfig/main.c
--- a/ipconfig/main.c Tue Apr 29 13:22:55 2003
+++ b/ipconfig/main.c Tue Apr 29 13:22:55 2003
@@ -391,10 +391,10 @@
dev->name = devname;
if (netdev_init_if(dev) == -1)
- return;
+ goto bail;
if (bootp_init_if(dev) == -1)
- return;
+ goto bail;
printf("IP-Config: %s hardware address", dev->name);
for (i = 0; i < dev->hwlen; i++)
@@ -406,6 +406,22 @@
if (dev->caps && netdev_up(dev) == 0)
add_one_dev(dev);
+ return;
+ bail:
+ free(dev);
+}
+
+static void check_f...
2011 Jul 18
2
ipconfig:About the length of 'options' field of DHCP packet
...t/ipconfig/netdev.h | 1 +
4 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/usr/kinit/ipconfig/bootp_proto.c b/usr/kinit/ipconfig/bootp_proto.c
index f2cc90c..19c61ef 100644
--- a/usr/kinit/ipconfig/bootp_proto.c
+++ b/usr/kinit/ipconfig/bootp_proto.c
@@ -212,5 +212,11 @@ int bootp_init_if(struct netdev *dev)
dev->bootp.xid = (uint32_t) lrand48();
dev->open_time = time(NULL);
+ /*
+ * 'process_timeout_event(main.c)' will increment 'fail_count'
+ * only once independent of a failure.
+ */
+ dev->bootp.fail_count = ~0;
+
return 0;
}
diff --git a/usr...
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...)
}
}
bail:
- packet_close();
-
+ if (fds)
+ free(fds);
return rc;
}
@@ -498,6 +503,8 @@ static int add_one_dev(struct netdev *dev)
state->next = slist;
slist = state;
+ n_devices++;
+
return 0;
}
@@ -675,6 +682,9 @@ static struct netdev *add_device(const char *info)
if (bootp_init_if(dev) == -1)
goto bail;
+ if (packet_open(dev) == -1)
+ goto bail;
+
printf("IP-Config: %s hardware address", dev->name);
for (i = 0; i < dev->hwlen; i++)
printf("%c%02x", i == 0 ? ' ' : ':', dev->hwaddr[i]);
diff --git a/usr/kinit/ipconfi...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...)
}
}
bail:
- packet_close();
-
+ if (fds)
+ free(fds);
return rc;
}
@@ -498,6 +503,8 @@ static int add_one_dev(struct netdev *dev)
state->next = slist;
slist = state;
+ n_devices++;
+
return 0;
}
@@ -675,6 +682,9 @@ static struct netdev *add_device(const char *info)
if (bootp_init_if(dev) == -1)
goto bail;
+ if (packet_open(dev) == -1)
+ goto bail;
+
printf("IP-Config: %s hardware address", dev->name);
for (i = 0; i < dev->hwlen; i++)
printf("%c%02x", i == 0 ? ' ' : ':', dev->hwaddr[i]);
diff --git a/usr/kinit/ipconfi...
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of
klibc.
Ben.
Ben Hutchings (1):
[klibc] run-init: Add dry-run mode
Jay Vosburgh (1):
[klibc] ipconfig: Use separate sockets for DHCP from multiple
interfaces
Mathieu Trudel-Lapierre (1):
[klibc] ipconfig: Set broadcast when sending DHCPREQUEST and
DHCPDISCOVER
YunQiang Su (1):
[klibc] mips: setjmp.S: don't