From c837ca39c6bd3bf948013319aed057007654b533 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Mon, 14 Aug 2000 08:43:40 +0000 Subject: [PATCH] Don't delete sticky routes when unconfiguring the interface. Deleting all routes that match the interface is sufficient. --- usr.sbin/ppp/ipcp.c | 2 -- usr.sbin/ppp/route.c | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 2fafac1da1c6..fc05447b886c 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -924,8 +924,6 @@ ipcp_CleanInterface(struct ipcp *ipcp) { struct iface *iface = ipcp->fsm.bundle->iface; - route_Clean(ipcp->fsm.bundle, ipcp->route); - if (iface->in_addrs && (Enabled(ipcp->fsm.bundle, OPT_PROXY) || Enabled(ipcp->fsm.bundle, OPT_PROXYALL))) { int s = ID0socket(AF_INET, SOCK_DGRAM, 0); diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c index 6a9b3bac4075..d820e96b05e6 100644 --- a/usr.sbin/ppp/route.c +++ b/usr.sbin/ppp/route.c @@ -569,18 +569,6 @@ route_Change(struct bundle *bundle, struct sticky_route *r, } } -void -route_Clean(struct bundle *bundle, struct sticky_route *r) -{ - struct in_addr none, del; - - none.s_addr = INADDR_ANY; - for (; r; r = r->next) { - del.s_addr = r->dst.s_addr & r->mask.s_addr; - bundle_SetRoute(bundle, RTM_DELETE, del, none, none, 1, 0); - } -} - void route_Add(struct sticky_route **rp, int type, struct in_addr dst, struct in_addr mask, struct in_addr gw)