Remove set loopback' and
show loopback' and add
`enable loopback' and `disable loopback'. Re-write the explaination of `enable idcheck'.
This commit is contained in:
parent
cd9647a100
commit
0b3acc6e48
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=35011
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: command.c,v 1.131.2.44 1998/04/03 19:21:13 brian Exp $
|
||||
* $Id: command.c,v 1.131.2.45 1998/04/03 19:23:54 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
@ -185,21 +185,6 @@ DialCommand(struct cmdargs const *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
SetLoopback(struct cmdargs const *arg)
|
||||
{
|
||||
if (arg->argc == 1)
|
||||
if (!strcasecmp(*arg->argv, "on")) {
|
||||
VarLoopback = 1;
|
||||
return 0;
|
||||
}
|
||||
else if (!strcasecmp(*arg->argv, "off")) {
|
||||
VarLoopback = 0;
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
ShellCommand(struct cmdargs const *arg, int bg)
|
||||
{
|
||||
@ -386,13 +371,6 @@ static struct cmdtab const Commands[] = {
|
||||
{NULL, NULL, NULL},
|
||||
};
|
||||
|
||||
static int
|
||||
ShowLoopback(struct cmdargs const *arg)
|
||||
{
|
||||
prompt_Printf(&prompt, "Local loopback is %s\n", VarLoopback ? "on" : "off");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ShowLogLevel(struct cmdargs const *arg)
|
||||
{
|
||||
@ -575,8 +553,6 @@ static struct cmdtab const ShowCommands[] = {
|
||||
"Show LCP status", "show lcp"},
|
||||
{"links", "link", bundle_ShowLinks, LOCAL_AUTH,
|
||||
"Show available link names", "show links"},
|
||||
{"loopback", NULL, ShowLoopback, LOCAL_AUTH,
|
||||
"Show loopback setting", "show loopback"},
|
||||
{"log", NULL, ShowLogLevel, LOCAL_AUTH,
|
||||
"Show log levels", "show log"},
|
||||
{"mem", NULL, ShowMemMap, LOCAL_AUTH,
|
||||
@ -1452,8 +1428,6 @@ static struct cmdtab const SetCommands[] = {
|
||||
"set ifaddr [src-addr [dst-addr [netmask [trg-addr]]]]"},
|
||||
{"filter", NULL, SetFilter, LOCAL_AUTH,
|
||||
"Set packet filters", "set filter in|out|dial|alive ..."},
|
||||
{"loopback", NULL, SetLoopback, LOCAL_AUTH,
|
||||
"Set loopback facility", "set loopback on|off"},
|
||||
{"log", NULL, SetLogLevel, LOCAL_AUTH,
|
||||
"Set log level", "set log [local] [+|-]value..."},
|
||||
{"login", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX,
|
||||
|
@ -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.121.2.39 1998/03/25 18:38:59 brian Exp $
|
||||
* $Id: main.c,v 1.121.2.40 1998/04/03 19:21:36 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Add commands for traffic summary, version display, etc.
|
||||
@ -590,7 +590,7 @@ DoLoop(struct bundle *bundle)
|
||||
if (((struct ip *)tun.data)->ip_dst.s_addr ==
|
||||
bundle->ncp.ipcp.my_ip.s_addr) {
|
||||
/* we've been asked to send something addressed *to* us :( */
|
||||
if (VarLoopback) {
|
||||
if (Enabled(ConfLoopback)) {
|
||||
pri = PacketCheck(bundle, tun.data, n, &bundle->filter.in);
|
||||
if (pri >= 0) {
|
||||
struct mbuf *bp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $Id: ppp.8,v 1.97.2.7 1998/03/20 19:47:03 brian Exp $
|
||||
.\" $Id: ppp.8,v 1.97.2.8 1998/04/03 19:24:04 brian Exp $
|
||||
.Dd 20 September 1995
|
||||
.Os FreeBSD
|
||||
.Dt PPP 8
|
||||
@ -1697,14 +1697,32 @@ not to make any utmp or wtmp entries. This is usually only necessary if
|
||||
you require the user to both login and authenticate themselves.
|
||||
.It idcheck
|
||||
Default: Enabled. When
|
||||
.Nm Ppp
|
||||
responds to an LCP packet, it must set the LCP Identifier field to be the
|
||||
same as the Identifier field of the request. Disabling
|
||||
.Ar idcheck
|
||||
makes
|
||||
.Nm
|
||||
ignore the value of the identifier field so that packets are
|
||||
processed rather than being dropped.
|
||||
exchanges low-level LCP, CCP and IPCP configuration traffic, the
|
||||
.Em Identifier
|
||||
field of any replies is expected to be the same as that of the request.
|
||||
By default,
|
||||
.Nm
|
||||
drops any reply packets that do not contain the expected identifier
|
||||
field, reporting the fact at the respective log level. If
|
||||
.Ar idcheck
|
||||
is disabled,
|
||||
.Nm
|
||||
will ignore the identifier field.
|
||||
.It loopback
|
||||
Default: Enabled. When
|
||||
.Ar loopback
|
||||
is enabled,
|
||||
.Nm
|
||||
will automatically loop back packets being sent
|
||||
out with a destination address equal to that of the
|
||||
.Em PPP
|
||||
interface. If disabled,
|
||||
.Nm
|
||||
will send the packet, probably resulting in an ICMP redirect from
|
||||
the other end. It is convenient to have this option enabled when
|
||||
the interface is also the default route as it avoids the necessity
|
||||
of a loopback route.
|
||||
.El
|
||||
.Pp
|
||||
.It add[!] dest mask gateway
|
||||
@ -2318,19 +2336,6 @@ will wait before resending Finite State Machine (FSM) Request packets.
|
||||
The default
|
||||
.Ar period
|
||||
for all FSMs is 3 seconds (which should suffice in most cases).
|
||||
.It set loopback on|off
|
||||
When set to
|
||||
.Ar on
|
||||
(the default),
|
||||
.Nm
|
||||
will automatically loop back packets being sent
|
||||
out with a destination address equal to that of the
|
||||
.Em PPP
|
||||
interface. If set to
|
||||
.Ar off ,
|
||||
.Nm
|
||||
will send the packet, probably resulting in an ICMP redirect from
|
||||
the other end.
|
||||
.It set log [local] [+|-]value...
|
||||
This command allows the adjustment of the current log level. Refer
|
||||
to the Logging Facility section for further details.
|
||||
@ -2570,8 +2575,6 @@ Show the current HDLC statistics.
|
||||
Show the current IPCP statistics.
|
||||
.It show lcp
|
||||
Show the current LCP statistics.
|
||||
.It show loopback
|
||||
Show the current loopback status.
|
||||
.It show log
|
||||
Show the current log values.
|
||||
.It show mem
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: vars.c,v 1.45.2.18 1998/04/03 19:21:55 brian Exp $
|
||||
* $Id: vars.c,v 1.45.2.19 1998/04/03 19:24:06 brian Exp $
|
||||
*
|
||||
*/
|
||||
#include <sys/param.h>
|
||||
@ -48,7 +48,7 @@
|
||||
#include "prompt.h"
|
||||
|
||||
char VarVersion[] = "PPP Version 2.0-beta";
|
||||
char VarLocalVersion[] = "$Date: 1998/04/03 19:21:55 $";
|
||||
char VarLocalVersion[] = "$Date: 1998/04/03 19:24:06 $";
|
||||
|
||||
/*
|
||||
* Order of conf option is important. See vars.h.
|
||||
@ -69,11 +69,12 @@ struct confdesc pppConfs[] = {
|
||||
{"throughput", CONF_DISABLE, CONF_NONE},
|
||||
{"utmp", CONF_ENABLE, CONF_NONE},
|
||||
{"idcheck", CONF_ENABLE, CONF_NONE},
|
||||
{"loopback", CONF_ENABLE, CONF_NONE},
|
||||
{NULL},
|
||||
};
|
||||
|
||||
struct pppvars pppVars = {
|
||||
1, LOCAL_NO_AUTH
|
||||
LOCAL_NO_AUTH
|
||||
};
|
||||
|
||||
int
|
||||
|
@ -15,7 +15,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: vars.h,v 1.42.2.15 1998/03/24 18:47:32 brian Exp $
|
||||
* $Id: vars.h,v 1.42.2.16 1998/04/03 19:24:07 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
*/
|
||||
@ -48,7 +48,8 @@ struct confdesc {
|
||||
#define ConfThroughput 12
|
||||
#define ConfUtmp 13
|
||||
#define ConfIdCheck 14
|
||||
#define MAXCONFS 15
|
||||
#define ConfLoopback 15
|
||||
#define MAXCONFS 16
|
||||
|
||||
#define Enabled(x) (pppConfs[x].myside & CONF_ENABLE)
|
||||
#define Acceptable(x) (pppConfs[x].hisside & CONF_ACCEPT)
|
||||
@ -56,7 +57,6 @@ struct confdesc {
|
||||
extern struct confdesc pppConfs[MAXCONFS + 1];
|
||||
|
||||
struct pppvars {
|
||||
int loopback; /* Turn around packets addressed to me */
|
||||
#define LOCAL_AUTH 0x01
|
||||
#define LOCAL_NO_AUTH 0x02
|
||||
#define LOCAL_DENY 0x03
|
||||
@ -74,7 +74,6 @@ struct pppvars {
|
||||
struct aliasHandlers handler; /* Alias function pointers */
|
||||
};
|
||||
|
||||
#define VarLoopback pppVars.loopback
|
||||
#define VarLocalAuth pppVars.lauth
|
||||
|
||||
#define VarAuthKey pppVars.auth_key
|
||||
|
Loading…
Reference in New Issue
Block a user