summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/main.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/main.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/main.c')
-rw-r--r--usr.sbin/ppp/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 772be6c..0c9a5cf 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: main.c,v 1.20 1996/07/09 17:40:36 ache Exp $
+ * $Id: main.c,v 1.21 1996/10/07 04:21:00 jkh Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@@ -61,6 +61,7 @@ extern void AsyncInput(), IpOutput();
extern int SelectSystem();
extern void DecodeCommand(), Prompt();
+extern int aft_cmd;
extern int IsInteractive();
extern struct in_addr ifnetmask;
static void DoLoop(void);
@@ -455,6 +456,7 @@ PacketMode()
if ((mode & (MODE_INTER|MODE_AUTO)) == MODE_INTER) {
TtyCommandMode(1);
fprintf(stderr, "Packet mode.\r\n");
+ aft_cmd = 1;
}
}
@@ -483,6 +485,7 @@ ReadTty()
#endif
if (!TermMode) {
n = read(netfd, linebuff, sizeof(linebuff)-1);
+ aft_cmd = 1;
if (n > 0) {
DecodeCommand(linebuff, n, 1);
} else {
@@ -644,6 +647,7 @@ DoLoop()
if (mode & MODE_DIRECT) {
modem = OpenModem(mode);
LogPrintf(LOG_PHASE_BIT, "Packet mode enabled\n");
+ fflush(stderr);
PacketMode();
} else if (mode & MODE_DEDICATED) {
if (!modem)
OpenPOWER on IntegriCloud