2 * ipcp.c - PPP IP Control Protocol.
4 * Copyright (c) 1989 Carnegie Mellon University.
7 * Redistribution and use in source and binary forms are permitted
8 * provided that the above copyright notice and this paragraph are
9 * duplicated in all such forms and that any documentation,
10 * advertising materials, and other materials related to such
11 * distribution and use acknowledge that the software was developed
12 * by Carnegie Mellon University. The name of the
13 * University may not be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 static char rcsid[] = "$Id: ipcp.c,v 1.1 1993/11/11 03:54:25 paulus Exp $";
26 * Fix IP address negotiation (wantoptions or hisoptions).
27 * Don't set zero IP addresses.
32 #include <sys/ioctl.h>
33 #include <sys/types.h>
34 #include <sys/socket.h>
38 #include <net/if_ppp.h>
39 #include <net/route.h>
40 #include <netinet/in.h>
51 ipcp_options ipcp_wantoptions[NPPP]; /* Options that we want to request */
52 ipcp_options ipcp_gotoptions[NPPP]; /* Options that peer ack'd */
53 ipcp_options ipcp_allowoptions[NPPP]; /* Options we allow peer to request */
54 ipcp_options ipcp_hisoptions[NPPP]; /* Options that we ack'd */
57 static int cis_received[NPPP]; /* # Conf-Reqs received */
60 * Callbacks for fsm code. (CI = Configuration Information)
62 static void ipcp_resetci __ARGS((fsm *)); /* Reset our CI */
63 static int ipcp_cilen __ARGS((fsm *)); /* Return length of our CI */
64 static void ipcp_addci __ARGS((fsm *, u_char *, int *)); /* Add our CI */
65 static int ipcp_ackci __ARGS((fsm *, u_char *, int)); /* Peer ack'd our CI */
66 static int ipcp_nakci __ARGS((fsm *, u_char *, int)); /* Peer nak'd our CI */
67 static int ipcp_rejci __ARGS((fsm *, u_char *, int)); /* Peer rej'd our CI */
68 static int ipcp_reqci __ARGS((fsm *, u_char *, int *, int)); /* Rcv CI */
69 static void ipcp_up __ARGS((fsm *)); /* We're UP */
70 static void ipcp_down __ARGS((fsm *)); /* We're DOWN */
73 fsm ipcp_fsm[NPPP]; /* IPCP fsm structure */
75 static fsm_callbacks ipcp_callbacks = { /* IPCP callback routines */
76 ipcp_resetci, /* Reset our Configuration Information */
77 ipcp_cilen, /* Length of our Configuration Information */
78 ipcp_addci, /* Add our Configuration Information */
79 ipcp_ackci, /* ACK our Configuration Information */
80 ipcp_nakci, /* NAK our Configuration Information */
81 ipcp_rejci, /* Reject our Configuration Information */
82 ipcp_reqci, /* Request peer's Configuration Information */
83 ipcp_up, /* Called when fsm reaches OPENED state */
84 ipcp_down, /* Called when fsm leaves OPENED state */
85 NULL, /* Called when we want the lower layer up */
86 NULL, /* Called when we want the lower layer down */
87 NULL, /* Called when Protocol-Reject received */
88 NULL, /* Retransmission is necessary */
89 NULL, /* Called to handle protocol-specific codes */
90 "IPCP" /* String name of protocol */
94 * Lengths of configuration options.
97 #define CILEN_COMPRESS 4 /* min length for compression protocol opt. */
98 #define CILEN_VJ 6 /* length for RFC1332 Van-Jacobson opt. */
99 #define CILEN_ADDR 6 /* new-style single address option */
100 #define CILEN_ADDRS 10 /* old-style dual address option */
103 #define CODENAME(x) ((x) == CONFACK ? "ACK" : \
104 (x) == CONFNAK ? "NAK" : "REJ")
108 * Make a string representation of a network IP address.
116 ipaddr = ntohl(ipaddr);
118 sprintf(b, "%d.%d.%d.%d",
119 (u_char)(ipaddr >> 24),
120 (u_char)(ipaddr >> 16),
121 (u_char)(ipaddr >> 8),
128 * ipcp_init - Initialize IPCP.
134 fsm *f = &ipcp_fsm[unit];
135 ipcp_options *wo = &ipcp_wantoptions[unit];
136 ipcp_options *ao = &ipcp_allowoptions[unit];
140 f->callbacks = &ipcp_callbacks;
141 fsm_init(&ipcp_fsm[unit]);
150 wo->vj_protocol = IPCP_VJ_COMP;
151 wo->maxslotindex = MAX_STATES - 1; /* really max index */
154 /* max slots and slot-id compression are currently hardwired in */
155 /* ppp_if.c to 16 and 1, this needs to be changed (among other */
160 ao->maxslotindex = MAX_STATES - 1;
166 * ipcp_open - IPCP is allowed to come up.
172 fsm_open(&ipcp_fsm[unit]);
177 * ipcp_close - Take IPCP down.
183 fsm_close(&ipcp_fsm[unit]);
188 * ipcp_lowerup - The lower layer is up.
194 fsm_lowerup(&ipcp_fsm[unit]);
199 * ipcp_lowerdown - The lower layer is down.
205 fsm_lowerdown(&ipcp_fsm[unit]);
210 * ipcp_input - Input IPCP packet.
213 ipcp_input(unit, p, len)
218 fsm_input(&ipcp_fsm[unit], p, len);
223 * ipcp_protrej - A Protocol-Reject was received for IPCP.
225 * Pretend the lower layer went down, so we shut up.
231 fsm_lowerdown(&ipcp_fsm[unit]);
236 * ipcp_resetci - Reset our CI.
242 ipcp_options *wo = &ipcp_wantoptions[f->unit];
244 wo->req_addr = wo->neg_addr && ipcp_allowoptions[f->unit].neg_addr;
245 ipcp_gotoptions[f->unit] = *wo;
246 cis_received[f->unit] = 0;
251 * ipcp_cilen - Return length of our CI.
257 ipcp_options *go = &ipcp_gotoptions[f->unit];
259 #define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0)
260 #define LENCIADDR(neg, old) (neg ? (old? CILEN_ADDRS : CILEN_ADDR) : 0)
262 return (LENCIADDR(go->neg_addr, go->old_addrs) +
263 LENCIVJ(go->neg_vj, go->old_vj));
268 * ipcp_addci - Add our desired CIs to a packet.
271 ipcp_addci(f, ucp, lenp)
276 ipcp_options *wo = &ipcp_wantoptions[f->unit];
277 ipcp_options *go = &ipcp_gotoptions[f->unit];
278 ipcp_options *ho = &ipcp_hisoptions[f->unit];
281 #define ADDCIVJ(opt, neg, val, old, maxslotindex, cflag) \
283 int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \
284 if (len >= vjlen) { \
286 PUTCHAR(vjlen, ucp); \
287 PUTSHORT(val, ucp); \
289 PUTCHAR(maxslotindex, ucp); \
290 PUTCHAR(cflag, ucp); \
297 #define ADDCIADDR(opt, neg, old, val1, val2) \
299 int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \
300 if (len >= addrlen) { \
303 PUTCHAR(addrlen, ucp); \
316 * First see if we want to change our options to the old
317 * forms because we have received old forms from the peer.
319 if (wo->neg_addr && !go->neg_addr && !go->old_addrs) {
320 /* use the old style of address negotiation */
324 if (wo->neg_vj && !go->neg_vj && !go->old_vj) {
325 /* try an older style of VJ negotiation */
326 if (cis_received[f->unit] == 0) {
327 /* keep trying the new style until we see some CI from the peer */
330 /* use the old style only if the peer did */
331 if (ho->neg_vj && ho->old_vj) {
334 go->vj_protocol = ho->vj_protocol;
339 ADDCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), go->neg_addr,
340 go->old_addrs, go->ouraddr, go->hisaddr);
342 ADDCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj,
343 go->maxslotindex, go->cflag);
350 * ipcp_ackci - Ack our CIs.
357 ipcp_ackci(f, p, len)
362 ipcp_options *go = &ipcp_gotoptions[f->unit];
363 u_short cilen, citype, cishort;
365 u_char cimaxslotindex, cicflag;
368 * CIs must be in exactly the same order that we sent...
369 * Check packet length and CI length at each step.
370 * If we find any deviations, then this packet is bad.
373 #define ACKCIVJ(opt, neg, val, old, maxslotindex, cflag) \
375 int vjlen = old? CILEN_COMPRESS : CILEN_VJ; \
376 if ((len -= vjlen) < 0) \
378 GETCHAR(citype, p); \
380 if (cilen != vjlen || \
383 GETSHORT(cishort, p); \
384 if (cishort != val) \
387 GETCHAR(cimaxslotindex, p); \
388 if (cimaxslotindex != maxslotindex) \
390 GETCHAR(cicflag, p); \
391 if (cicflag != cflag) \
396 #define ACKCIADDR(opt, neg, old, val1, val2) \
398 int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \
400 if ((len -= addrlen) < 0) \
402 GETCHAR(citype, p); \
404 if (cilen != addrlen || \
409 if (val1 != cilong) \
414 if (val2 != cilong) \
419 ACKCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), go->neg_addr,
420 go->old_addrs, go->ouraddr, go->hisaddr);
422 ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj,
423 go->maxslotindex, go->cflag);
426 * If there are any remaining CIs, then this packet is bad.
433 IPCPDEBUG((LOG_INFO, "ipcp_ackci: received bad Ack!"));
438 * ipcp_nakci - Peer has sent a NAK for some of our CIs.
439 * This should not modify any state if the Nak is bad
440 * or if IPCP is in the OPENED state.
447 ipcp_nakci(f, p, len)
452 ipcp_options *go = &ipcp_gotoptions[f->unit];
453 u_char cimaxslotindex, cicflag;
454 u_char citype, cilen, *next;
456 u_long ciaddr1, ciaddr2, l;
457 ipcp_options no; /* options we've seen Naks for */
458 ipcp_options try; /* options to request next time */
460 BZERO(&no, sizeof(no));
464 * Any Nak'd CIs must be in exactly the same order that we sent.
465 * Check packet length and CI length at each step.
466 * If we find any deviations, then this packet is bad.
468 #define NAKCIADDR(opt, neg, old, code) \
470 len >= (cilen = (old? CILEN_ADDRS: CILEN_ADDR)) && \
476 ciaddr1 = htonl(l); \
479 ciaddr2 = htonl(l); \
487 #define NAKCIVJ(opt, neg, code) \
489 ((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) && \
494 GETSHORT(cishort, p); \
495 if (cilen == CILEN_VJ) { \
496 GETCHAR(cimaxslotindex, p); \
497 GETCHAR(cicflag, p); \
504 * Accept the peer's idea of our address if we don't know it.
505 * Accept the peer's idea of his address if he knows it.
507 NAKCIADDR(CI_ADDR, neg_addr, go->old_addrs,
508 if (!go->ouraddr && ciaddr1) { /* Do we know our address? */
509 go->ouraddr = ciaddr1;
510 IPCPDEBUG((LOG_INFO, "local IP address %s",
513 if (ciaddr2) { /* Does he know his? */
514 go->hisaddr = ciaddr2;
515 IPCPDEBUG((LOG_INFO, "remote IP address %s",
521 * Accept the peer's value of maxslotindex provided that it
522 * is less than what we asked for. Turn off slot-ID compression
523 * if the peer wants. Send old-style compress-type option if
526 NAKCIVJ(CI_COMPRESSTYPE, neg_vj,
527 if (cilen == CILEN_VJ) {
528 if (cishort == IPCP_VJ_COMP) {
530 if (cimaxslotindex < go->maxslotindex)
531 try.maxslotindex = cimaxslotindex;
538 if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) {
540 try.vj_protocol = cishort;
548 * There may be remaining CIs, if the peer is requesting negotiation
549 * on an option that we didn't include in our request packet.
550 * If they want to negotiate about IP addresses, we comply.
551 * If they want us to ask for compression, we refuse.
553 while (len > CILEN_VOID) {
556 if( (len -= cilen) < 0 )
558 next = p + cilen - 2;
561 case CI_COMPRESSTYPE:
562 if (go->neg_vj || no.neg_vj ||
563 (cilen != CILEN_VJ && cilen != CILEN_COMPRESS))
568 if (go->neg_addr && go->old_addrs || no.old_addrs
569 || cilen != CILEN_ADDRS)
576 try.ouraddr = ciaddr1;
580 try.hisaddr = ciaddr2;
584 if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR)
591 try.ouraddr = ciaddr1;
600 /* If there is still anything left, this packet is bad. */
605 * OK, the Nak is good. Now we can update state.
607 if (f->state != OPENED)
613 IPCPDEBUG((LOG_INFO, "ipcp_nakci: received bad Nak!"));
619 * ipcp_rejci - Reject some of our CIs.
622 ipcp_rejci(f, p, len)
627 ipcp_options *go = &ipcp_gotoptions[f->unit];
628 u_char cimaxslotindex, ciflag, cilen;
631 ipcp_options try; /* options to request next time */
635 * Any Rejected CIs must be in exactly the same order that we sent.
636 * Check packet length and CI length at each step.
637 * If we find any deviations, then this packet is bad.
639 #define REJCIADDR(opt, neg, old, val1, val2) \
641 len >= (cilen = old? CILEN_ADDRS: CILEN_ADDR) && \
649 /* Check rejected value. */ \
650 if (cilong != val1) \
655 /* Check rejected value. */ \
656 if (cilong != val2) \
662 #define REJCIVJ(opt, neg, val, old, maxslot, cflag) \
664 p[1] == (old? CILEN_COMPRESS : CILEN_VJ) && \
669 GETSHORT(cishort, p); \
670 /* Check rejected value. */ \
671 if (cishort != val) \
674 GETCHAR(cimaxslotindex, p); \
675 if (cimaxslotindex != maxslot) \
677 GETCHAR(ciflag, p); \
678 if (ciflag != cflag) \
684 REJCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), neg_addr,
685 go->old_addrs, go->ouraddr, go->hisaddr);
687 REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol, go->old_vj,
688 go->maxslotindex, go->cflag);
691 * If there are any remaining CIs, then this packet is bad.
696 * Now we can update state.
698 if (f->state != OPENED)
703 IPCPDEBUG((LOG_INFO, "ipcp_rejci: received bad Reject!"));
709 * ipcp_reqci - Check the peer's requested CIs and send appropriate response.
711 * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified
712 * appropriately. If reject_if_disagree is non-zero, doesn't return
713 * CONFNAK; returns CONFREJ if it can't return CONFACK.
716 ipcp_reqci(f, inp, len, reject_if_disagree)
718 u_char *inp; /* Requested CIs */
719 int *len; /* Length of requested CIs */
720 int reject_if_disagree;
722 ipcp_options *wo = &ipcp_wantoptions[f->unit];
723 ipcp_options *ho = &ipcp_hisoptions[f->unit];
724 ipcp_options *ao = &ipcp_allowoptions[f->unit];
725 ipcp_options *go = &ipcp_gotoptions[f->unit];
726 u_char *cip, *next; /* Pointer to current and next CIs */
727 u_short cilen, citype; /* Parsed len, type */
728 u_short cishort; /* Parsed short value */
729 u_long tl, ciaddr1, ciaddr2;/* Parsed address values */
730 int rc = CONFACK; /* Final packet return code */
731 int orc; /* Individual option return code */
732 u_char *p; /* Pointer to next char to parse */
733 u_char *ucp = inp; /* Pointer to current output char */
734 int l = *len; /* Length left */
735 u_char maxslotindex, cflag;
738 * Reset all his options.
740 BZERO(ho, sizeof(*ho));
743 * Process all his options.
747 orc = CONFACK; /* Assume success */
748 cip = p = next; /* Remember begining of CI */
749 if (l < 2 || /* Not enough data for CI header or */
750 p[1] < 2 || /* CI length too small or */
751 p[1] > l) { /* CI length too big? */
752 IPCPDEBUG((LOG_INFO, "ipcp_reqci: bad CI length!"));
753 orc = CONFREJ; /* Reject bad CI */
754 cilen = l; /* Reject till end of packet */
755 l = 0; /* Don't loop again */
758 GETCHAR(citype, p); /* Parse CI type */
759 GETCHAR(cilen, p); /* Parse CI length */
760 l -= cilen; /* Adjust remaining length */
761 next += cilen; /* Step to next CI */
763 switch (citype) { /* Check CI type */
765 IPCPDEBUG((LOG_INFO, "ipcp: received ADDRS "));
767 cilen != CILEN_ADDRS) { /* Check CI length */
768 orc = CONFREJ; /* Reject CI */
773 * If he has no address, or if we both have his address but
774 * disagree about it, then NAK it with our idea.
775 * In particular, if we don't know his address, but he does,
778 GETLONG(tl, p); /* Parse source address (his) */
780 IPCPDEBUG((LOG_INFO, "(%s:", ip_ntoa(ciaddr1)));
781 if (wo->hisaddr && ciaddr1 != wo->hisaddr) {
783 if (!reject_if_disagree) {
784 DECPTR(sizeof (long), p);
785 tl = ntohl(wo->hisaddr);
791 * If he doesn't know our address, or if we both have our address
792 * but disagree about it, then NAK it with our idea.
794 GETLONG(tl, p); /* Parse desination address (ours) */
796 IPCPDEBUG((LOG_INFO, "%s)", ip_ntoa(ciaddr2)));
797 if (wo->ouraddr && ciaddr2 != wo->ouraddr) {
799 if (!reject_if_disagree) {
800 DECPTR(sizeof (long), p);
801 tl = ntohl(wo->ouraddr);
810 ho->hisaddr = ciaddr1;
811 ho->ouraddr = ciaddr2;
815 IPCPDEBUG((LOG_INFO, "ipcp: received ADDR "));
818 cilen != CILEN_ADDR) { /* Check CI length */
819 orc = CONFREJ; /* Reject CI */
824 * If he has no address, or if we both have his address but
825 * disagree about it, then NAK it with our idea.
826 * In particular, if we don't know his address, but he does,
829 GETLONG(tl, p); /* Parse source address (his) */
831 IPCPDEBUG((LOG_INFO, "(%s)", ip_ntoa(ciaddr1)));
832 if (wo->hisaddr && ciaddr1 != wo->hisaddr) {
834 if (!reject_if_disagree) {
835 DECPTR(sizeof (long), p);
836 tl = ntohl(wo->hisaddr);
845 ho->hisaddr = ciaddr1;
848 case CI_COMPRESSTYPE:
849 IPCPDEBUG((LOG_INFO, "ipcp: received COMPRESSTYPE "));
851 (cilen != CILEN_VJ && cilen != CILEN_COMPRESS)) {
855 GETSHORT(cishort, p);
856 IPCPDEBUG((LOG_INFO, "(%d)", cishort));
858 if (!(cishort == IPCP_VJ_COMP ||
859 (cishort == IPCP_VJ_COMP_OLD && cilen == CILEN_COMPRESS))) {
865 ho->vj_protocol = cishort;
866 if (cilen == CILEN_VJ) {
867 GETCHAR(maxslotindex, p);
868 if (maxslotindex > ao->maxslotindex) {
870 if (!reject_if_disagree){
872 PUTCHAR(ao->maxslotindex, p);
876 if (cflag && !ao->cflag) {
878 if (!reject_if_disagree){
880 PUTCHAR(wo->cflag, p);
885 ho->maxslotindex = maxslotindex;
886 ho->cflag = wo->cflag;
896 IPCPDEBUG((LOG_INFO, " (%s)\n", CODENAME(orc)));
898 if (orc == CONFACK && /* Good CI */
899 rc != CONFACK) /* but prior CI wasnt? */
900 continue; /* Don't send this one */
902 if (orc == CONFNAK) { /* Nak this CI? */
903 if (reject_if_disagree) /* Getting fed up with sending NAKs? */
904 orc = CONFREJ; /* Get tough if so */
906 if (rc == CONFREJ) /* Rejecting prior CI? */
907 continue; /* Don't send this one */
908 if (rc == CONFACK) { /* Ack'd all prior CIs? */
909 rc = CONFNAK; /* Not anymore... */
910 ucp = inp; /* Backup */
915 if (orc == CONFREJ && /* Reject this CI */
916 rc != CONFREJ) { /* but no prior ones? */
918 ucp = inp; /* Backup */
921 /* Need to move CI? */
923 BCOPY(cip, ucp, cilen); /* Move it */
925 /* Update output pointer */
930 * If we aren't rejecting this packet, and we want to negotiate
931 * their address, and they didn't send their address, then we
932 * send a NAK with a CI_ADDR option appended. We assume the
933 * input buffer is long enough that we can append the extra
936 if (rc != CONFREJ && !ho->neg_addr &&
937 wo->req_addr && !reject_if_disagree) {
940 ucp = inp; /* reset pointer */
941 wo->req_addr = 0; /* don't ask again */
943 PUTCHAR(CI_ADDR, ucp);
944 PUTCHAR(CILEN_ADDR, ucp);
945 tl = ntohl(wo->hisaddr);
949 *len = ucp - inp; /* Compute output length */
950 IPCPDEBUG((LOG_INFO, "ipcp: returning Configure-%s", CODENAME(rc)));
951 return (rc); /* Return final code */
956 * ipcp_up - IPCP has come UP.
958 * Configure the IP network interface appropriately and bring it up.
965 ipcp_options *ho = &ipcp_hisoptions[f->unit];
966 ipcp_options *go = &ipcp_gotoptions[f->unit];
968 IPCPDEBUG((LOG_INFO, "ipcp: up"));
969 go->default_route = 0;
973 * We must have a non-zero IP address for both ends of the link.
975 if (ho->hisaddr == 0)
976 ho->hisaddr = ipcp_wantoptions[f->unit].hisaddr;
978 if (ho->hisaddr == 0) {
979 syslog(LOG_ERR, "Could not determine remote IP address");
983 if (go->ouraddr == 0) {
984 syslog(LOG_ERR, "Could not determine local IP address");
990 * Check that the peer is allowed to use the IP address he wants.
992 if (!auth_ip_addr(f->unit, ho->hisaddr)) {
993 syslog(LOG_ERR, "Peer is not authorized to use remote address %s",
994 ip_ntoa(ho->hisaddr));
999 syslog(LOG_NOTICE, "local IP address %s", ip_ntoa(go->ouraddr));
1000 syslog(LOG_NOTICE, "remote IP address %s", ip_ntoa(ho->hisaddr));
1003 * Set IP addresses and (if specified) netmask.
1005 mask = GetMask(go->ouraddr);
1006 if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask)) {
1007 IPCPDEBUG((LOG_WARNING, "sifaddr failed"));
1008 ipcp_close(f->unit);
1012 /* set tcp compression */
1013 sifvjcomp(f->unit, ho->neg_vj, ho->cflag);
1015 /* bring the interface up for IP */
1016 if (!sifup(f->unit)) {
1017 IPCPDEBUG((LOG_WARNING, "sifup failed"));
1018 ipcp_close(f->unit);
1022 /* assign a default route through the interface if required */
1023 if (ipcp_wantoptions[f->unit].default_route)
1024 if (sifdefaultroute(f->unit, ho->hisaddr))
1025 go->default_route = 1;
1027 /* Make a proxy ARP entry if requested. */
1028 if (ipcp_wantoptions[f->unit].proxy_arp)
1029 if (sifproxyarp(f->unit, ho->hisaddr))
1035 * ipcp_down - IPCP has gone DOWN.
1037 * Take the IP network interface down, clear its addresses
1038 * and delete routes through it.
1044 u_long ouraddr, hisaddr;
1046 IPCPDEBUG((LOG_INFO, "ipcp: down"));
1048 ouraddr = ipcp_gotoptions[f->unit].ouraddr;
1049 hisaddr = ipcp_hisoptions[f->unit].hisaddr;
1050 if (ipcp_gotoptions[f->unit].proxy_arp)
1051 cifproxyarp(f->unit, hisaddr);
1052 if (ipcp_gotoptions[f->unit].default_route)
1053 cifdefaultroute(f->unit, hisaddr);
1055 cifaddr(f->unit, ouraddr, hisaddr);