diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-11-25 11:05:11 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-11-25 11:05:11 +0000 |
commit | a9798afbe0ac1fc76003db44f88a4664cb912780 (patch) | |
tree | 82baefdd6efb98a67fbad02c5267a380057439a5 /sbin/dhclient/dhclient.c | |
parent | 542eb7e3189ac6f6794df8d6f7c3234bdd5a5b69 (diff) |
Ignore 0.0.0.0 in RTM_NEWADDR messages as these messages are generated by
dhclient. This fixes the dhclient exiting problem reported by Steve Shockley.
This is a fast fix for the problem acctually the dhclient-script needs to be
replaced. OK henning@ deraadt@
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r-- | sbin/dhclient/dhclient.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 19c8fe3929a..5ec80e95828 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.60 2004/09/15 23:33:41 deraadt Exp $ */ +/* $OpenBSD: dhclient.c,v 1.61 2004/11/25 11:05:10 claudio Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -164,6 +164,7 @@ get_ifa(char *cp, int n) return (NULL); } +struct iaddr defaddr = { 4 }; /* ARGSUSED */ void @@ -202,6 +203,8 @@ routehandler(struct protocol *p) if ((a.len = sizeof(struct in_addr)) > sizeof(a.iabuf)) error("king bula sez: len mismatch"); memcpy(a.iabuf, &((struct sockaddr_in *)sa)->sin_addr, a.len); + if (addr_eq(a, defaddr)) + break; for (l = ifi->client->active; l != NULL; l = l->next) if (addr_eq(a, l->address)) @@ -211,7 +214,6 @@ routehandler(struct protocol *p) break; goto die; - break; case RTM_DELADDR: ifam = (struct ifa_msghdr *)rtm; if (ifam->ifam_index != ifi->index) |