X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fipxcp.c;h=8b45f89116efc5348538196a34067df84da99b3f;hp=91cad490b72de1b82e7b5334e78511773564744a;hb=ff268e8e2eb130a0d3443b7e4974789ef67cada8;hpb=5ba9d88b943e9d5a3ababdadf1d2e246581dfdc6 diff --git a/pppd/ipxcp.c b/pppd/ipxcp.c index 91cad49..8b45f89 100644 --- a/pppd/ipxcp.c +++ b/pppd/ipxcp.c @@ -18,9 +18,8 @@ */ #ifdef IPX_CHANGE -#ifndef lint -static char rcsid[] = "$Id: ipxcp.c,v 1.14 1999/03/22 05:55:31 paulus Exp $"; -#endif + +#define RCSID "$Id: ipxcp.c,v 1.18 1999/08/24 05:31:09 paulus Exp $" /* * TODO: @@ -40,6 +39,8 @@ static char rcsid[] = "$Id: ipxcp.c,v 1.14 1999/03/22 05:55:31 paulus Exp $"; #include "pathnames.h" #include "magic.h" +static const char rcsid[] = RCSID; + /* global vars */ ipxcp_options ipxcp_wantoptions[NUM_PPP]; /* Options that we want to request */ ipxcp_options ipxcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */ @@ -101,7 +102,7 @@ static option_t ipxcp_option_list[] = { "Disable IPXCP (and IPX)" }, { "-ipx", o_bool, &ipxcp_protent.enabled_flag, "Disable IPXCP (and IPX)" } , - { "ipx-network", o_int, &ipxcp_wantoptions[0].our_network, + { "ipx-network", o_uint32, &ipxcp_wantoptions[0].our_network, "Set our IPX network number", 0, &ipxcp_wantoptions[0].neg_nn }, { "ipxcp-accept-network", o_bool, &ipxcp_wantoptions[0].accept_network, "Accept peer IPX network number", 1, @@ -1265,6 +1266,7 @@ ipxcp_up(f) ipxcp_close(unit, "Interface configuration failed"); return; } + ipxcp_is_up = 1; /* set the network number for IPX */ if (!sipxfaddr(unit, go->network, go->our_node)) { @@ -1274,7 +1276,6 @@ ipxcp_up(f) return; } - ipxcp_is_up = 1; np_up(f->unit, PPP_IPX); /* @@ -1298,11 +1299,12 @@ ipxcp_down(f) { IPXCPDEBUG(("ipxcp: down")); - if (ipxcp_is_up) { - ipxcp_is_up = 0; - np_down(f->unit, PPP_IPX); - } - cipxfaddr (f->unit); + if (!ipxcp_is_up) + return; + ipxcp_is_up = 0; + np_down(f->unit, PPP_IPX); + cipxfaddr(f->unit); + sifnpmode(f->unit, PPP_IPX, NPMODE_DROP); sifdown(f->unit); ipxcp_script (f, _PATH_IPXDOWN); }