Displaying 2 results from an estimated 2 matches for "d501bec".
Did you mean:
d501ab6c
2011 Mar 27
4
ipconfig problem if multiple devices are up
...`----
Now you can test everything:
sudo ipconfig -t 10 tap0
IP-Config: no response after 5 secs - giving up
sudo ipconfig -t 10 tap1
IP-Config: no response after 5 secs - giving up
I added additional debug output:
,----
| diff --git a/usr/kinit/ipconfig/main.c b/usr/kinit/ipconfig/main.c
| index d501bec..8e1b62a 100644
| --- a/usr/kinit/ipconfig/main.c
| +++ b/usr/kinit/ipconfig/main.c
| @@ -312,7 +313,8 @@ static int do_pkt_recv(int pkt_fd, time_t now)
| return ret;
|
| for (s = slist; s; s = s->next) {
| - if (s->dev->ifindex == ifindex) {
| +...
2011 Mar 28
5
[PATCH 1/3] Only peek and discard packets from specified device.
...cp_proto.c
+++ b/usr/kinit/ipconfig/dhcp_proto.c
@@ -147,7 +147,7 @@ static int dhcp_recv(struct netdev *dev)
};
int ret;
- ret = packet_recv(iov, 3);
+ ret = packet_recv(dev, iov, 3);
if (ret <= 0)
return ret;
diff --git a/usr/kinit/ipconfig/main.c b/usr/kinit/ipconfig/main.c
index d501bec..1e48083 100644
--- a/usr/kinit/ipconfig/main.c
+++ b/usr/kinit/ipconfig/main.c
@@ -304,23 +304,19 @@ struct netdev *ifaces;
*/
static int do_pkt_recv(int pkt_fd, time_t now)
{
- int ifindex, ret;
+ int ret = 0;
struct state *s;
- ret = packet_peek(&ifindex);
- if (ret == 0)
- return r...