Otherwise the network is unavailable for several seconds
after boot. There's really no good solution here, but this
one is probably the best, i.e. hoping that things don't go wrong.
nb. turning DAD off cannot be implemented properly with our
current src-netbsd because the dad_count sysctl node is missing.
The current hack will prevent from linking a non-kernonly image
without networking, but I don't think anyone is using that
currently anyway. To be fixed properly after I next update
src-netbsd.
Fixes issue #56.
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/queue.h>
+#include <sys/sysctl.h>
#include <assert.h>
#include <err.h>
warnx("FAILED: mount tmpfs on /tmp: %s", strerror(tmpfserrno));
}
+ /*
+ * We set duplicate address detection off for
+ * immediately operational DHCP addresses.
+ * (note: we don't check for errors since net.inet.ip.dad_count
+ * is not present if the networking stack isn't present)
+ */
+#if 0
+ /* XXXX: cpp macro lossage in the src-netbsd, cannot fix easily now */
+ int x = 0;
+ sysctlbyname("net.inet.ip.dad_count", NULL, NULL, &x, sizeof(x));
+#else
+ extern int rumpns_ip_dad_count;
+ rumpns_ip_dad_count = 0;
+#endif
+
+
rumprun_config(cmdline);
sysproxy = getenv("RUMPRUN_SYSPROXY");