diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-07-12 01:28:11 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-07-12 01:28:11 +0000 |
commit | a411418963c7d664db529efe4064ef84cb7bb8e9 (patch) | |
tree | f2b81d1e24c059fc2ea139f72fd7ac75e474a7e0 | |
parent | 4963458c15da03c9f2030e35686f4e93e271c3c4 (diff) |
- support ipv6cpretry and ipv6cpretries, which are IPv6 versions
of ipcpretry and ipcpretries.
- improve handling of IPv6 link-local addresses
From brian FreeBSD
-rw-r--r-- | usr.sbin/ppp/ppp/command.c | 12 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/ncpaddr.c | 9 |
2 files changed, 19 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/command.c b/usr.sbin/ppp/ppp/command.c index da9f74baa7e..a21b07c3f51 100644 --- a/usr.sbin/ppp/ppp/command.c +++ b/usr.sbin/ppp/ppp/command.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: command.c,v 1.81 2005/07/11 22:34:56 brad Exp $ + * $OpenBSD: command.c,v 1.82 2005/07/12 01:28:10 brad Exp $ */ #include <sys/param.h> @@ -140,6 +140,7 @@ #define VAR_LOGOUT 34 #define VAR_IFQUEUE 35 #define VAR_MPPE 36 +#define VAR_IPV6CPRETRY 37 /* ``accept|deny|disable|enable'' masks */ #define NEG_HISMASK (1) @@ -2045,6 +2046,13 @@ SetVariable(struct cmdargs const *arg) &arg->bundle->ncp.ipcp.cfg.fsm.maxtrm, DEF_FSMTRIES); break; + case VAR_IPV6CPRETRY: + res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn, + &arg->bundle->ncp.ipv6cp.cfg.fsm.timeout, + &arg->bundle->ncp.ipv6cp.cfg.fsm.maxreq, + &arg->bundle->ncp.ipv6cp.cfg.fsm.maxtrm, DEF_FSMTRIES); + break; + case VAR_NBNS: case VAR_DNS: if (param == VAR_DNS) { @@ -2303,6 +2311,8 @@ static struct cmdtab const SetCommands[] = { "set ifqueue packets", (const void *)VAR_IFQUEUE}, {"ipcpretry", "ipcpretries", SetVariable, LOCAL_AUTH, "IPCP retries", "set ipcpretry value [attempts]", (const void *)VAR_IPCPRETRY}, + {"ipv6cpretry", "ipv6cpretries", SetVariable, LOCAL_AUTH, "IPV6CP retries", + "set ipv6cpretry value [attempts]", (const void *)VAR_IPV6CPRETRY}, {"lcpretry", "lcpretries", SetVariable, LOCAL_AUTH | LOCAL_CX, "LCP retries", "set lcpretry value [attempts]", (const void *)VAR_LCPRETRY}, {"log", NULL, log_SetLevel, LOCAL_AUTH, "log level", diff --git a/usr.sbin/ppp/ppp/ncpaddr.c b/usr.sbin/ppp/ppp/ncpaddr.c index 2d9d9fce3f3..05ef803c43e 100644 --- a/usr.sbin/ppp/ppp/ncpaddr.c +++ b/usr.sbin/ppp/ppp/ncpaddr.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: ncpaddr.c,v 1.10 2005/07/12 01:16:16 brad Exp $ + * $OpenBSD: ncpaddr.c,v 1.11 2005/07/12 01:28:10 brad Exp $ */ #include <sys/types.h> @@ -163,12 +163,19 @@ static void adjust_linklocal(struct sockaddr_in6 *sin6) { /* XXX: ?????!?!?!!!!! This is horrible ! */ +#if 0 + /* + * The kernel does not understand sin6_scope_id for routing at this moment. + * We should rather keep the embedded ID. + * jinmei@kame.net, 20011026 + */ if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&sin6->sin6_addr)) { sin6->sin6_scope_id = ntohs(*(u_short *)&sin6->sin6_addr.s6_addr[2]); *(u_short *)&sin6->sin6_addr.s6_addr[2] = 0; } +#endif } #endif |