summary refs log tree commit diff
path: root/src/rdisc/tests/test-rdisc-linux.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-01-20 16:26:51 +0100
committerMichael Biebl <biebl@debian.org>2016-01-20 16:26:51 +0100
commit494f296a3baab08522617b24b1f126d8f9a17502 (patch)
treec8ef32fb0dd1c4ff35a0b38e787abb58692de0cd /src/rdisc/tests/test-rdisc-linux.c
parent54f6333410ffd570e62717d9e77c5c987175e397 (diff)
Imported Upstream version 1.1.90 upstream/1.1.90
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);