]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only send interfaces which have a reason.
authorRoy Marples <roy@marples.name>
Thu, 15 May 2014 12:02:03 +0000 (12:02 +0000)
committerRoy Marples <roy@marples.name>
Thu, 15 May 2014 12:02:03 +0000 (12:02 +0000)
script.c

index cad6ed072e4f5d359b940c24ba0686170440f7b8..bbc9006a26d04c1cfbede743a495155e777458cb 100644 (file)
--- a/script.c
+++ b/script.c
@@ -551,7 +551,7 @@ send_interface(int fd, const struct interface *ifp)
        if (send_interface1(fd, ifp, reason) == -1)
                        retval = -1;
 #ifdef INET
-       if (d)
+       if (d && d->reason)
                if (send_interface1(fd, ifp, d->reason) == -1)
                        retval = -1;
 #endif
@@ -561,7 +561,7 @@ send_interface(int fd, const struct interface *ifp)
                if (send_interface1(fd, ifp, "ROUTERADVERT") == -1)
                        retval = -1;
        }
-       if (D6_STATE_RUNNING(ifp)) {
+       if (D6_STATE_RUNNING(ifp) && d6->reason) {
                if (send_interface1(fd, ifp, d6->reason) == -1)
                        retval = -1;
        }