]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Report RA information when testing.
authorRoy Marples <roy@marples.name>
Thu, 28 Jun 2012 09:11:24 +0000 (09:11 +0000)
committerRoy Marples <roy@marples.name>
Thu, 28 Jun 2012 09:11:24 +0000 (09:11 +0000)
configure.c
dhcpcd-hooks/01-test

index 4b610c8b2fbe36d528e3350951015514d9046511..a2d262f51f656d9553a2121b679b832ceb080f29 100644 (file)
@@ -172,7 +172,12 @@ make_env(const struct interface *iface, const char *reason, char ***argv)
        int dhcp, ra;
 
        dhcp = ra = 0;
-       if (strcmp(reason, "ROUTERADVERT") == 0)
+       if (strcmp(reason, "TEST") == 0) {
+               if (iface->ras)
+                       ra = 1;
+               else
+                       dhcp = 1;
+       } else if (strcmp(reason, "ROUTERADVERT") == 0)
                ra = 1;
        else
                dhcp = 1;
index b46d40050bf2b2df6f760246634c4786ba503d62..ac71f089583dd729f6da0d7fe4565986c9821426 100644 (file)
@@ -2,5 +2,5 @@
 
 if [ "$reason" = "TEST" ]; then
        set | grep "^\(interface\|metric\|pid\|reason\|skip_hooks\)=" | sort
-       set | grep "^\(new_\|old_\)" | sort
+       set | grep "^\(new_\|old_\|ra_count=\|ra[0-9]*_\)" | sort
 fi