summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/chat.c5
-rw-r--r--usr.sbin/ppp/mppe.c2
-rw-r--r--usr.sbin/ppp/ppp.813
-rw-r--r--usr.sbin/ppp/route.c19
4 files changed, 8 insertions, 31 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index 04b2679..daa52cd 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -154,6 +154,11 @@ chat_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
else {
/* c->state = CHAT_EXPECT; */
c->argptr = &arg_term;
+ /*
+ We have to clear the input buffer, because it contains output
+ from the previous (timed out) command.
+ */
+ c->bufstart = c->bufend;
}
c->TimedOut = 0;
}
diff --git a/usr.sbin/ppp/mppe.c b/usr.sbin/ppp/mppe.c
index 141574f..f1fadc3 100644
--- a/usr.sbin/ppp/mppe.c
+++ b/usr.sbin/ppp/mppe.c
@@ -168,7 +168,7 @@ MPPEOutput(void *v, struct ccp *ccp, struct link *l __unused, int pri __unused,
dictinit = 0;
log_Printf(LogDEBUG, "MPPE: Output: Proto %02x (%d bytes)\n", *proto, ilen);
- if (*proto < 0x21 && *proto > 0xFA) {
+ if (*proto < 0x21 || *proto > 0xFA) {
log_Printf(LogDEBUG, "MPPE: Output: Not encrypting\n");
ccp->compout += ilen;
ccp->uncompout += ilen;
diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8
index 7358a48..c4ebe50 100644
--- a/usr.sbin/ppp/ppp.8
+++ b/usr.sbin/ppp/ppp.8
@@ -1188,7 +1188,6 @@ Use Hardware Handshake (CTS/RTS) for flow control.
.It
Modem should be set to NO echo back (ATE0) and NO results string (ATQ1).
.El
-.Pp
.It
Edit
.Pa /etc/ttys
@@ -1796,7 +1795,6 @@ If no timeout is given, the default timeout (set using
.Ic set timeout
and defaulting to 180 seconds) is used.
.El
-.Pp
.It
Each filter can hold up to 40 rules, starting from rule 0.
The entire rule set is not effective until rule 0 is defined,
@@ -2207,7 +2205,6 @@ ISPs IP number would be:
.Bd -literal -offset indent
set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0
.Ed
-.Pp
.It
In most cases, your ISP will also be your default router.
If this is the case, add the line
@@ -3241,7 +3238,6 @@ not to make any utmp or wtmp entries.
This is usually only necessary if
you require the user to both login and authenticate themselves.
.El
-.Pp
.It add Ns Xo
.Op !\&
.Ar dest Ns Op / Ns Ar nn
@@ -3395,7 +3391,6 @@ When running in multi-link mode, a section can be loaded if it allows
.Em any
of the currently existing line modes.
.El
-.Pp
.It nat Ar command Op Ar args
This command allows the control of the network address translation (also
known as masquerading or IP aliasing) facilities that are built into
@@ -3584,7 +3579,6 @@ are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
These commands are also discussed in the file
.Pa README.nat
which comes with the source distribution.
-.Pp
.It Oo !\& Oc Ns Xo
.No bg Ar command
.Xc
@@ -3890,7 +3884,6 @@ mode, all interface addresses are deleted.
.Pp
If the INET or INET6 arguments are used, only addresses for that address
family are cleared.
-.Pp
.It iface delete Ns Xo
.Op !\& Ns
.No |rm Ns Op !\&
@@ -4392,7 +4385,6 @@ the connection.
This is required (in addition to one or more other callback
options) if you wish callback to be optional.
.El
-.Pp
.It set cbcp Oo
.No *| Ns Ar number Ns Oo
.No , Ns Ar number Ns ...\& Oc
@@ -5441,7 +5433,6 @@ This also applies for RADIUS routes that do not {include} the
or
.Dv HISADDR
keywords.
-.Pp
.It RAD_FRAMED_IPV6_PREFIX
If this attribute is supplied, the value is substituted for IPV6PREFIX
in a command.
@@ -5493,7 +5484,6 @@ also applies for RADIUS IPv6 routes that do not {include} the
or
.Dv HISADDR6
keywords.
-.Pp
.It RAD_SESSION_TIMEOUT
If supplied, the client connection is closed after the given number of
seconds.
@@ -5853,7 +5843,6 @@ and
.Ar 16
inclusive.
.El
-.Pp
.It shell|! Op Ar command
If
.Ar command
@@ -5933,7 +5922,6 @@ Show the active alarm timers.
Show the current version number of
.Nm .
.El
-.Pp
.It term
Go into terminal mode.
Characters typed at the keyboard are sent to the device.
@@ -5966,7 +5954,6 @@ http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/faq/ppp.html
.It
http://www.FreeBSD.org/doc/handbook/userppp.html
.El
-.Pp
.El
.Sh FILES
.Nm
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index e7db97e..758b403 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -158,26 +158,16 @@ static struct bits {
{ RTF_MODIFIED, 'M' },
{ RTF_DONE, 'd' },
{ RTF_XRESOLVE, 'X' },
-#ifdef RTF_CLONING
- { RTF_CLONING, 'C' },
-#endif
{ RTF_STATIC, 'S' },
{ RTF_PROTO1, '1' },
{ RTF_PROTO2, '2' },
{ RTF_BLACKHOLE, 'B' },
-
#ifdef RTF_LLINFO
{ RTF_LLINFO, 'L' },
#endif
#ifdef RTF_CLONING
{ RTF_CLONING, 'C' },
#endif
-#ifdef RTF_WASCLONED
- { RTF_WASCLONED, 'W' },
-#endif
-#ifdef RTF_PRCLONING
- { RTF_PRCLONING, 'c' },
-#endif
#ifdef RTF_PROTO3
{ RTF_PROTO3, '3' },
#endif
@@ -187,10 +177,6 @@ static struct bits {
{ 0, '\0' }
};
-#ifndef RTF_WASCLONED
-#define RTF_WASCLONED (0)
-#endif
-
static void
p_flags(struct prompt *prompt, u_int32_t f, unsigned max)
{
@@ -434,7 +420,7 @@ route_IfDelete(struct bundle *bundle, int all)
* route X was cloned from route Y (and is no longer there 'cos it
* may have gone with route Y).
*/
- if (RTF_WASCLONED == 0 && pass == 0)
+ if (pass == 0)
/* So we can't tell ! */
continue;
for (cp = sp; cp < ep; cp += rtm->rtm_msglen) {
@@ -461,8 +447,7 @@ route_IfDelete(struct bundle *bundle, int all)
sa[RTAX_GATEWAY]->sa_family == AF_INET6 ||
#endif
sa[RTAX_GATEWAY]->sa_family == AF_LINK) {
- if ((pass == 0 && (rtm->rtm_flags & RTF_WASCLONED)) ||
- (pass == 1 && !(rtm->rtm_flags & RTF_WASCLONED))) {
+ if (pass == 1) {
ncprange_setsa(&range, sa[RTAX_DST], sa[RTAX_NETMASK]);
rt_Set(bundle, RTM_DELETE, &range, NULL, 0, 0);
} else
OpenPOWER on IntegriCloud