summary refs log tree commit diff
path: root/src/rdisc/tests/test-rdisc-linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rdisc/tests/test-rdisc-linux.c')
-rw-r--r--src/rdisc/tests/test-rdisc-linux.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/rdisc/tests/test-rdisc-linux.c b/src/rdisc/tests/test-rdisc-linux.c
index eddb3b0e..b93c50a7 100644
--- a/src/rdisc/tests/test-rdisc-linux.c
+++ b/src/rdisc/tests/test-rdisc-linux.c
@@ -25,7 +25,7 @@
 
 #include "nm-rdisc.h"
 #include "nm-lndp-rdisc.h"
-#include "nm-logging.h"
+#include "nm-default.h"
 
 #include "nm-linux-platform.h"
 
@@ -40,6 +40,8 @@ main (int argc, char **argv)
 	NMRDisc *rdisc;
 	int ifindex = 1;
 	const char *ifname;
+	NMUtilsIPv6IfaceId iid = { };
+	GError *error = NULL;
 
 	nmtst_init_with_logging (&argc, &argv, NULL, "DEFAULT");
 
@@ -60,12 +62,19 @@ main (int argc, char **argv)
 		return EXIT_FAILURE;
 	}
 
-	rdisc = nm_lndp_rdisc_new (ifindex, ifname);
+	rdisc = nm_lndp_rdisc_new (ifindex,
+	                           ifname,
+	                           "8ce666e8-d34d-4fb1-b858-f15a7al28086",
+	                           NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_EUI64,
+	                           &error);
 	if (!rdisc) {
-		g_print ("Failed to create NMRDisc instance\n");
+		g_print ("Failed to create NMRDisc instance: %s\n", error->message);
+		g_error_free (error);
 		return EXIT_FAILURE;
 	}
 
+	iid.id_u8[7] = 1;
+	nm_rdisc_set_iid (rdisc, iid);
 	nm_rdisc_start (rdisc);
 	g_main_loop_run (loop);