diff options
author | brian <brian@FreeBSD.org> | 2001-08-18 13:04:52 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-08-18 13:04:52 +0000 |
commit | cfa5d0ff529c7c68582be2d05f344e470d61c5df (patch) | |
tree | a0dbd40d60699c490ea869291dd1aa069e6a2682 /usr.sbin/ppp/ipv6cp.c | |
parent | fb43a54a68c52f79dc2f14a17ce4618c023e958e (diff) | |
download | FreeBSD-src-cfa5d0ff529c7c68582be2d05f344e470d61c5df.zip FreeBSD-src-cfa5d0ff529c7c68582be2d05f344e470d61c5df.tar.gz |
Run correctly on a machine built without AF_INET6 support
Diffstat (limited to 'usr.sbin/ppp/ipv6cp.c')
-rw-r--r-- | usr.sbin/ppp/ipv6cp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ipv6cp.c b/usr.sbin/ppp/ipv6cp.c index 6ec1485..5067997 100644 --- a/usr.sbin/ppp/ipv6cp.c +++ b/usr.sbin/ppp/ipv6cp.c @@ -73,6 +73,7 @@ #include "prompt.h" #include "async.h" #include "physical.h" +#include "probe.h" #ifndef NOINET6 @@ -224,6 +225,11 @@ ipv6cp_Show(struct cmdargs const *arg) { struct ipv6cp *ipv6cp = &arg->bundle->ncp.ipv6cp; + if (!probe.ipv6_available) { + prompt_Printf(arg->prompt, "ipv6 not available\n"); + return 0; + } + prompt_Printf(arg->prompt, "%s [%s]\n", ipv6cp->fsm.name, State2Nam(ipv6cp->fsm.state)); if (ipv6cp->fsm.state == ST_OPENED) { @@ -251,7 +257,7 @@ ipv6cp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) { /* Got PROTO_IPV6CP from link */ m_settype(bp, MB_IPV6CPIN); - if (bundle_Phase(bundle) == PHASE_NETWORK) + if (bundle_Phase(bundle) == PHASE_NETWORK && probe.ipv6_available) fsm_Input(&bundle->ncp.ipv6cp.fsm, bp); else { if (bundle_Phase(bundle) < PHASE_NETWORK) |