]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/ccp.c
Nit: use _exit when exec fails and restrict values to 0-255 per POSIX.
[ppp.git] / pppd / ccp.c
index fd51952e02bb21eaf14339a587db1baaac3ec06b..5814f358eb44c5a4791f06b8170c69d45e7c4e9d 100644 (file)
@@ -28,7 +28,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: ccp.c,v 1.48 2004/11/13 02:28:15 paulus Exp $"
+#define RCSID  "$Id: ccp.c,v 1.50 2005/06/26 19:34:41 carlsonj Exp $"
 
 #include <stdlib.h>
 #include <string.h>
@@ -898,6 +898,7 @@ ccp_nakci(f, p, len, treat_as_reject)
     fsm *f;
     u_char *p;
     int len;
+    int treat_as_reject;
 {
     ccp_options *go = &ccp_gotoptions[f->unit];
     ccp_options no;            /* options we've seen already */
@@ -1158,8 +1159,11 @@ ccp_reqci(f, p, lenp, dont_nak)
                    }
                } else {
                    /* Neither are set. */
-                   newret = CONFREJ;
-                   break;
+                   /* We cannot accept this.  */
+                   newret = CONFNAK;
+                   /* Give the peer our idea of what can be used,
+                      so it can choose and confirm */
+                   ho->mppe = ao->mppe;
                }
 
                /* rebuild the opts */