*/
#ifndef lint
-static char rcsid[] = "$Id: ipcp.c,v 1.39 1999/03/16 03:12:03 paulus Exp $";
+static char rcsid[] = "$Id: ipcp.c,v 1.43 1999/03/19 04:23:39 paulus Exp $";
#endif
/*
static int default_route_set[NUM_PPP]; /* Have set up a default route */
static int proxy_arp_set[NUM_PPP]; /* Have created proxy arp entry */
static bool usepeerdns; /* Ask peer for DNS addrs */
+static int ipcp_is_up; /* have called np_up() */
/*
* Callbacks for fsm code. (CI = Configuration Information)
NULL,
1,
"IPCP",
+ "IP",
ipcp_option_list,
ip_check_options,
ip_demand_conf,
p = next;
}
- /* If there is still anything left, this packet is bad. */
- if (len != 0)
- goto bad;
-
/*
* OK, the Nak is good. Now we can update state.
+ * If there are any remaining options, we ignore them.
*/
if (f->state != OPENED)
*go = try;
}
np_up(f->unit, PPP_IP);
+ ipcp_is_up = 1;
/*
* Execute the ip-up script, like this:
fsm *f;
{
IPCPDEBUG(("ipcp: down"));
- np_down(f->unit, PPP_IP);
+ if (get_ppp_stats(f->unit, &link_stats))
+ link_stats_valid = 1;
+ if (ipcp_is_up) {
+ ipcp_is_up = 0;
+ np_down(f->unit, PPP_IP);
+ }
sifvjcomp(f->unit, 0, 0, 0);
/*