aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/spppcontrol
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2001-12-30 20:43:09 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2001-12-30 20:43:09 +0000
commita38a8f75a4b0b40acfcb0e67de37356fd5449d81 (patch)
tree068d3149d316d0ee1a5f0bff940ac9ce35b5ec4f /sbin/spppcontrol
parentee037f26bc5987618ce8c06d1c0f1872a91bb468 (diff)
downloadsrc-a38a8f75a4b0b40acfcb0e67de37356fd5449d81.tar.gz
src-a38a8f75a4b0b40acfcb0e67de37356fd5449d81.zip
Implement the option to disable IPv6 on an sppp interface (counterpart
to the kernel code just committed). MFC after: 1 month
Notes
Notes: svn path=/head/; revision=88724
Diffstat (limited to 'sbin/spppcontrol')
-rw-r--r--sbin/spppcontrol/spppcontrol.814
-rw-r--r--sbin/spppcontrol/spppcontrol.c5
2 files changed, 18 insertions, 1 deletions
diff --git a/sbin/spppcontrol/spppcontrol.8 b/sbin/spppcontrol/spppcontrol.8
index ca227c9cf4d6..60c08a04ef4b 100644
--- a/sbin/spppcontrol/spppcontrol.8
+++ b/sbin/spppcontrol/spppcontrol.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 27, 2001
+.Dd December 30, 2001
.Os
.Dt SPPPCONTROL 8
.Sh NAME
@@ -172,6 +172,17 @@ defaulting to 3000 ms.
Enable negotiation of Van Jacobsen header compression. (Enabled by default.)
.It Ar disable-vj
Disable negotiation of Van Jacobsen header compression.
+.It Ar enable-ipv6
+Enable negotiation of the IPv6 network control protocol. (Enabled by
+default if the kernel has IPv6 enabled.)
+.It Ar disable-ipv6
+Disable negotiation of the IPv6 network control protocol. Since every
+IPv4 interface in an IPv6-enabled kernel automatically gets an IPv6
+address assigned, this option provides for a way to administratively
+prevent the link from attempting to negotiate IPv6. Note that
+initialization of an IPv6 interface causes a multicast packet to be
+sent, which can cause unwanted traffic costs (for dial-on-demand
+interfaces).
.El
.Sh EXAMPLES
.Bd -literal
@@ -181,6 +192,7 @@ bppp0: phase=dead
hisauthproto=chap hisauthname="ifb-gw" norechallenge
lcp-timeout=3000
enable-vj
+ enable-ipv6
.Ed
.Pp
Display the settings for bppp0. The interface is currently in
diff --git a/sbin/spppcontrol/spppcontrol.c b/sbin/spppcontrol/spppcontrol.c
index 2d205709e28d..26ec6a267ce8 100644
--- a/sbin/spppcontrol/spppcontrol.c
+++ b/sbin/spppcontrol/spppcontrol.c
@@ -177,6 +177,10 @@ main(int argc, char **argv)
spr.defs.enable_vj = 1;
else if (strcmp(argv[0], "disable-vj") == 0)
spr.defs.enable_vj = 0;
+ else if (strcmp(argv[0], "enable-ipv6") == 0)
+ spr.defs.enable_ipv6 = 1;
+ else if (strcmp(argv[0], "disable-ipv6") == 0)
+ spr.defs.enable_ipv6 = 0;
else
errx(EX_DATAERR, "bad parameter: \"%s\"", argv[0]);
@@ -221,6 +225,7 @@ print_vals(const char *ifname, struct spppreq *sp)
}
printf("\tlcp-timeout=%d ms\n", sp->defs.lcp.timeout);
printf("\t%sable-vj\n", sp->defs.enable_vj? "en": "dis");
+ printf("\t%sable-ipv6\n", sp->defs.enable_ipv6? "en": "dis");
}
const char *