]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
if-linux: if_setup_inet6 is called once so remove local ifname
authorRoy Marples <roy@marples.name>
Tue, 20 Feb 2018 08:25:59 +0000 (08:25 +0000)
committerRoy Marples <roy@marples.name>
Tue, 20 Feb 2018 08:27:07 +0000 (08:27 +0000)
src/if-linux.c

index e802366afb794f68319edea0a36d9a727e7a0df1..dfd3ffbe06d4b4edf7233dd9d5b75c2f69c0acb2 100644 (file)
@@ -1683,7 +1683,6 @@ static const char *prefix = "/proc/sys/net/ipv6/conf";
 void
 if_setup_inet6(const struct interface *ifp)
 {
-       const char *ifname;
        int ra;
        char path[256];
 
@@ -1702,14 +1701,14 @@ if_setup_inet6(const struct interface *ifp)
        if (!(ifp->options->options & DHCPCD_IPV6RS))
                return;
 
-       snprintf(path, sizeof(path), "%s/%s/autoconf", prefix, ifname);
+       snprintf(path, sizeof(path), "%s/%s/autoconf", prefix, ifp->name);
        ra = check_proc_int(path);
        if (ra != 1 && ra != -1) {
                if (write_path(path, "0") == -1)
                        logerr("%s: %s", __func__, path);
        }
 
-       snprintf(path, sizeof(path), "%s/%s/accept_ra", prefix, ifname);
+       snprintf(path, sizeof(path), "%s/%s/accept_ra", prefix, ifp->name);
        ra = check_proc_int(path);
        if (ra == -1) {
                logfunc_t *logfunc = errno == ENOENT? logdebug : logwarn;