summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/lcp.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-10-12 16:20:34 +0000
committerjkh <jkh@FreeBSD.org>1996-10-12 16:20:34 +0000
commitbba6a15120372e3d04f14cec0157e229a6953825 (patch)
tree9aaae040d84f7ca8e4d17ddd75851bfa12290e17 /usr.sbin/ppp/lcp.c
parent4ea380d58eccafbaafafcc405737bfcb59e8ee8b (diff)
downloadFreeBSD-src-bba6a15120372e3d04f14cec0157e229a6953825.zip
FreeBSD-src-bba6a15120372e3d04f14cec0157e229a6953825.tar.gz
1. Room to calculate MD5 for CHAP negotiation is shorter than
required. a core is not dumped at first connecting time and dumped at second or third time. (patch I) 2. A routine for "show route" refers out of allocated space. Values pointed by "lp" should be read as CHAR, I think. there is also no free() for disallocation. (patch II) Here is also a patch for an improvement: In current imprementation, even if PPP connection is disconnected by time out, prompt of interactive mode does not change from "PPP>" to "ppp>" to indicate the disconnection on a terminal. So I modified the code to do that. (patch III) Submitted-By: NAKAMURA Motonori <motonori@econ.kyoto-u.ac.jp>
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r--usr.sbin/ppp/lcp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index bb465e6..3e45553 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lcp.c,v 1.8 1996/01/30 11:08:35 dfr Exp $
+ * $Id: lcp.c,v 1.9 1996/05/11 20:48:28 phk Exp $
*
* TODO:
* o Validate magic number received from peer.
@@ -379,6 +379,7 @@ struct fsm *fp;
StopAllTimers();
OsLinkdown();
NewPhase(PHASE_TERMINATE);
+ Prompt(1);
}
void
@@ -663,6 +664,12 @@ reqreject:
}
break;
}
+ /* to avoid inf. loop */
+ if (length == 0) {
+ LogPrintf(LOG_LCP, "LCP size zero\n");
+ break;
+ }
+
plen -= length;
cp += length;
}
OpenPOWER on IntegriCloud