<br><br><div class="gmail_quote">On Fri, Jan 21, 2011 at 8:49 AM, Manuel Kasper <span dir="ltr"><<a href="mailto:mk@neon1.net">mk@neon1.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I'm using radvd under FreeBSD in conjunction with MPD (PPP daemon that dynamically creates a virtual interface per client). radvd 1.7 kept segfaulting on me after "ioctl(SIOCGIFMTU) failed for ng0: Device not configured" when starting with a configuration that references interfaces that don't exist yet.<br>
<br>
A trivial patch for device-bsd44.c is attached; perhaps it would also make sense to have the SIOCGIFMTU error message depend on !iface->IgnoreIfMissing?<br>
<br>
Regards,<br>
<font color="#888888"><br>
Manuel<br>
</font><br>--<br>
radvd-devel-l mailing list : <a href="mailto:radvd-devel-l@litech.org">radvd-devel-l@litech.org</a><br>
<a href="http://lists.litech.org/listinfo/radvd-devel-l" target="_blank">http://lists.litech.org/listinfo/radvd-devel-l</a><br></blockquote></div><br>Hi Manuel,<br><br>Your patch looks good. I've committed it. I've also added a check to make sure the device name exist. You may want to get the latest from CVS to see if all is working as you expect. My addition change is this...<br>
<br>Index: device-bsd44.c<br>===================================================================<br>RCS file: /work/cvsroot/radvd/device-bsd44.c,v<br>retrieving revision 1.26<br>diff -u -w -r1.26 device-bsd44.c<br>--- device-bsd44.c 22 Jan 2011 00:53:16 -0000 1.26<br>
+++ device-bsd44.c 22 Jan 2011 01:02:23 -0000<br>@@ -35,6 +35,9 @@<br> struct AdvPrefix *prefix;<br> char zero[sizeof(iface->if_addr)];<br> <br>+ if(if_nametoindex(iface->Name) == 0)<br>+ goto ret;<br>
+<br> memset(&ifr, 0, sizeof(ifr));<br> strncpy(ifr.ifr_name, iface->Name, IFNAMSIZ-1);<br> ifr.ifr_name[IFNAMSIZ-1] = '\0';<br><br>Thanks,<br>Reuben<br>