changeset 2485:50a9a63ba0fe draft

Only send interfaces which have a reason.
author Roy Marples <roy@marples.name>
date Thu, 15 May 2014 12:02:03 +0000
parents 4b43ba8b6c11
children ce30b6f4c921
files script.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/script.c	Fri May 09 12:09:05 2014 +0000
+++ b/script.c	Thu May 15 12:02:03 2014 +0000
@@ -551,7 +551,7 @@
 	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 @@
 		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;
 	}