summaryrefslogtreecommitdiffstats
path: root/sys/net/if_sppp.h
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2001-12-30 20:42:29 +0000
committerjoerg <joerg@FreeBSD.org>2001-12-30 20:42:29 +0000
commitdcd142d5d3afac395fcc167f01e9c2b20e9da913 (patch)
tree07bcd9f7764454c91bd188f8c248c39850b93a6f /sys/net/if_sppp.h
parenteb6032a814b012c30a23a7250fb77baec3f8d9d8 (diff)
downloadFreeBSD-src-dcd142d5d3afac395fcc167f01e9c2b20e9da913.zip
FreeBSD-src-dcd142d5d3afac395fcc167f01e9c2b20e9da913.tar.gz
Implement an option to administratively disable the negotiation of
IPv6 on an sppp interface. In an IPv6-enabled kernel, every IPv6 interface automatically gets an IPv6 address assigned (and IPv6 multicast packets sent at initialization time). For sppp links where we know our remote peer wouldn't support IPv6 at all, there's no point in attempting to negotiate IPV6CP (or to even dial out for an IPv6 packet at all for dial-on-demand interfaces). I wish there were a more generic way to administratively disable IPv6 on an interface instead. ume told me there isn't. While i was at it, converted both, enable_vj and enable_ipv6 into flag bits in struct sppp (enable_vj used to be an int of its own). MFC after: 1 month
Diffstat (limited to 'sys/net/if_sppp.h')
-rw-r--r--sys/net/if_sppp.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/net/if_sppp.h b/sys/net/if_sppp.h
index c4f3139..e602aa5 100644
--- a/sys/net/if_sppp.h
+++ b/sys/net/if_sppp.h
@@ -97,6 +97,13 @@ enum ppp_phase {
struct sppp_parms {
enum ppp_phase pp_phase; /* phase we're currently in */
int enable_vj; /* VJ header compression enabled */
+ int enable_ipv6; /*
+ * Enable IPv6 negotiations -- only
+ * needed since each IPv4 i/f auto-
+ * matically gets an IPv6 address
+ * assigned, so we can't use this as
+ * a decision.
+ */
struct slcp lcp; /* LCP params */
struct sipcp ipcp; /* IPCP params */
struct sipcp ipv6cp; /* IPv6CP params */
@@ -144,7 +151,9 @@ struct sppp {
u_char confid[IDX_COUNT]; /* id of last configuration request */
int rst_counter[IDX_COUNT]; /* restart counter */
int fail_counter[IDX_COUNT]; /* negotiation failure counter */
- int enable_vj; /* VJ header compression enabled */
+ int confflags; /* administrative configuration flags */
+#define CONF_ENABLE_VJ 0x01 /* VJ header compression enabled */
+#define CONF_ENABLE_IPV6 0x02 /* IPv6 administratively enabled */
time_t pp_last_recv; /* time last packet has been received */
time_t pp_last_sent; /* time last packet has been sent */
struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */
OpenPOWER on IntegriCloud