* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ipv6cp.c,v 1.2 1999/08/13 06:46:13 paulus Exp $
+ * $Id: ipv6cp.c,v 1.3 1999/08/24 05:31:09 paulus Exp $
*
*
* Original version by Inria (www.inria.fr)
* Modified to match RFC2472 by Tommi Komulainen <Tommi.Komulainen@iki.fi>
*/
-#define RCSID "$Id: ipv6cp.c,v 1.2 1999/08/13 06:46:13 paulus Exp $"
+#define RCSID "$Id: ipv6cp.c,v 1.3 1999/08/24 05:31:09 paulus Exp $"
/*
* TODO:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include "pppd.h"
#include "fsm.h"
ipv6cp_options *wo = &ipv6cp_wantoptions[0];
struct in6_addr addr;
-#define VALIDID(a) ( ((a).s6_addr64[0] == 0) && \
- ((a).s6_addr64[1] != 0) )
+#define VALIDID(a) ( (((a).s6_addr32[0] == 0) && ((a).s6_addr32[1] == 0)) && \
+ (((a).s6_addr32[2] != 0) || ((a).s6_addr32[3] != 0)) )
if ((comma = strchr(arg, ',')) == NULL)
comma = arg + strlen(arg);
ipv6cp_options *wo = &ipv6cp_wantoptions[u];
#if defined(__linux__) || (defined(SVR4) && (defined(SNI) || defined(__USLC__)))
- if (!sifup(u, PPP_IPV6))
+ if (!sifup(u))
return 0;
#endif
if (!sif6addr(u, wo->ourid, wo->hisid))
return 0;
#if !defined(__linux__) && !(defined(SVR4) && (defined(SNI) || defined(__USLC__)))
- if (!sifup(u, PPP_IPV6))
+ if (!sifup(u))
return 0;
#endif
if (!sifnpmode(u, PPP_IPV6, NPMODE_QUEUE))
#endif
/* bring the interface up for IPv6 */
- if (!sifup(f->unit, PPP_IPV6)) {
+ if (!sifup(f->unit)) {
if (debug)
warn("sif6up failed");
ipv6cp_close(f->unit, "Interface configuration failed");
sifnpmode(f->unit, PPP_IPV6, NPMODE_QUEUE);
} else {
#if !defined(__linux__) && !(defined(SVR4) && (defined(SNI) || defined(__USLC)))
- sifdown(f->unit, PPP_IPV6);
+ sifnpmode(f->unit, PPP_IPV6, NPMODE_DROP);
+ sifdown(f->unit);
#endif
ipv6cp_clear_addrs(f->unit);
#if defined(__linux__) || (defined(SVR4) && (defined(SNI) || defined(__USLC)))
- sifdown(f->unit, PPP_IPV6);
+ sifdown(f->unit);
#endif
}