]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/ipv6cp.c
pppd: Separate IPv6 handling for sifup/sifdown
[ppp.git] / pppd / ipv6cp.c
index caa2b265d7e7b20f3b3bb1a093d88d26fb1cdcda..7e760732d42db32507b4032bdf2e71b88dbecfa1 100644 (file)
@@ -1147,13 +1147,13 @@ ipv6_demand_conf(u)
     ipv6cp_options *wo = &ipv6cp_wantoptions[u];
 
 #if defined(__linux__) || defined(SOL2) || (defined(SVR4) && (defined(SNI) || defined(__USLC__)))
-#if defined(SOL2)
+#if defined(SOL2) || defined(__linux__)
     if (!sif6up(u))
        return 0;
 #else
     if (!sifup(u))
        return 0;
-#endif /* defined(SOL2) */
+#endif /* defined(SOL2) || defined(__linux__) */
 #endif    
     if (!sif6addr(u, wo->ourid, wo->hisid))
        return 0;
@@ -1260,10 +1260,10 @@ ipv6cp_up(f)
 #endif
 
        /* bring the interface up for IPv6 */
-#if defined(SOL2)
+#if defined(SOL2) || defined(__linux__)
        if (!sif6up(f->unit)) {
            if (debug)
-               warn("sifup failed (IPV6)");
+               warn("sif6up failed (IPV6)");
            ipv6cp_close(f->unit, "Interface configuration failed");
            return;
        }
@@ -1274,7 +1274,7 @@ ipv6cp_up(f)
            ipv6cp_close(f->unit, "Interface configuration failed");
            return;
        }
-#endif /* defined(SOL2) */
+#endif /* defined(SOL2) || defined(__linux__) */
 
 #if defined(__linux__) || defined(SOL2) || (defined(SVR4) && (defined(SNI) || defined(__USLC__)))
        if (!sif6addr(f->unit, go->ourid, ho->hisid)) {
@@ -1349,7 +1349,9 @@ ipv6cp_down(f)
        ipv6cp_clear_addrs(f->unit, 
                           ipv6cp_gotoptions[f->unit].ourid,
                           ipv6cp_hisoptions[f->unit].hisid);
-#if defined(__linux__) || (defined(SVR4) && (defined(SNI) || defined(__USLC)))
+#if defined(__linux__)
+       sif6down(f->unit);
+#elif defined(SVR4) && (defined(SNI) || defined(__USLC))
        sifdown(f->unit);
 #endif
     }