Blame SOURCES/radvd-no_dac_override.patch

78b6ee
diff --git a/radvd.c b/radvd.c
78b6ee
index 07a64a1..9f86cf6 100644
78b6ee
--- a/radvd.c
78b6ee
+++ b/radvd.c
78b6ee
@@ -346,6 +346,15 @@ int main(int argc, char *argv[])
78b6ee
 		flog(LOG_WARNING, "IPv6 forwarding seems to be disabled, but continuing anyway");
78b6ee
 	}
78b6ee
 
78b6ee
+	if (username) {
78b6ee
+		if (drop_root_privileges(username) < 0) {
78b6ee
+			perror("drop_root_privileges");
78b6ee
+			flog(LOG_ERR, "unable to drop root privileges");
78b6ee
+			exit(1);
78b6ee
+		}
78b6ee
+		dlog(LOG_DEBUG, 3, "running as user: %s", username);
78b6ee
+	}
78b6ee
+
78b6ee
 	int const pidfd = open_and_lock_pid_file(daemon_pid_file_ident);
78b6ee
 
78b6ee
 	/*
78b6ee
@@ -421,15 +430,6 @@ int main(int argc, char *argv[])
78b6ee
 	}
78b6ee
 #endif
78b6ee
 
78b6ee
-	if (username) {
78b6ee
-		if (drop_root_privileges(username) < 0) {
78b6ee
-			perror("drop_root_privileges");
78b6ee
-			flog(LOG_ERR, "unable to drop root privileges");
78b6ee
-			exit(1);
78b6ee
-		}
78b6ee
-		dlog(LOG_DEBUG, 3, "running as user: %s", username);
78b6ee
-	}
78b6ee
-
78b6ee
 	setup_ifaces(sock, ifaces);
78b6ee
 	ifaces = main_loop(sock, ifaces, conf_path);
78b6ee
 	stop_adverts(sock, ifaces);