From 620ca64f9a3ede1064ca158ea2aded4986a02f96 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 30 Mar 2013 16:10:02 +0000 Subject: 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@. --- sbin/dhclient/dhclient.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin/dhclient/dhclient.c') 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 @@ -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; -- cgit v1.2.3