diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-03-30 16:10:02 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-03-30 16:10:02 +0000 |
commit | 620ca64f9a3ede1064ca158ea2aded4986a02f96 (patch) | |
tree | 32c5c40cbffe43888ea5389d884d458f00042f50 /sbin/dhclient/dhclient.c | |
parent | d15ad55d69874d8032258f35ad357673e8fc6e2c (diff) |
Since deleting all the addresses on an interface removes all the
relevant entries from the arp cache, don't bother asking for/processing
arp entries in the route dumps. Thus allowing use of NET_RT_FLAGS
with RTF_GATEWAY and AF_INET, to ask for only the routes dhclient
wants to expunge rather than all routes in existance.
Greatly shrinks and simplifies the code. No intentional functional
change. Tested by sthen@.
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r-- | sbin/dhclient/dhclient.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 9aab9204880..59932f7aaaa 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.241 2013/03/22 23:58:51 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.242 2013/03/30 16:10:01 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -796,8 +796,9 @@ bind_lease(void) struct option_data *options; struct client_lease *lease; + /* Deleting the addresses also clears out arp entries. */ delete_addresses(ifi->name, ifi->rdomain); - flush_routes_and_arp_cache(ifi->name, ifi->rdomain); + flush_routes(ifi->name, ifi->rdomain); lease = apply_defaults(client->new); options = lease->options; |