<div dir="ltr">Did the last 50 lines make it through? I still have a message "awaiting moderator approval."<br><br>Thanks<br>Clifford<br><br><div class="gmail_quote">On Mon, Jul 28, 2008 at 6:44 PM, acv <<a href="mailto:acv@miniguru.ca">acv@miniguru.ca</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I only need the last ~50 lines or so. The idea is to pinpoint the last thing<br>
the software did...<br>
<br>
Alex<br>
<br>
On Mon, Jul 28, 2008 at 06:41:31PM -0400, Clifford Thurber wrote:<br>
> Date: Mon, 28 Jul 2008 18:41:31 -0400<br>
<div><div></div><div class="Wj3C7c">> From: "Clifford Thurber" <<a href="mailto:clifford@hdn.net">clifford@hdn.net</a>><br>
> To: "WiFiDog Captive Portal" <<a href="mailto:wifidog@listes.ilesansfil.org">wifidog@listes.ilesansfil.org</a>><br>
> Subject: Re: [isf-wifidog] seg fault<br>
><br>
> I think the output is getting rejected by the list server b/c the body is<br>
> too big with all the debug output. Is there a work around?<br>
><br>
> On Mon, Jul 28, 2008 at 6:32 PM, acv <<a href="mailto:acv@miniguru.ca">acv@miniguru.ca</a>> wrote:<br>
><br>
> > Wifidog should run in the foreground. What's the output when you try<br>
> > with -d 7 ?<br>
> ><br>
> > Alex<br>
> ><br>
> > On Mon, Jul 28, 2008 at 06:23:29PM -0400, Clifford Thurber wrote:<br>
> > > Date: Mon, 28 Jul 2008 18:23:29 -0400<br>
> > > From: "Clifford Thurber" <<a href="mailto:clifford@hdn.net">clifford@hdn.net</a>><br>
> > > To: "WiFiDog Captive Portal" <<a href="mailto:wifidog@listes.ilesansfil.org">wifidog@listes.ilesansfil.org</a>><br>
> > > Subject: Re: [isf-wifidog] seg fault<br>
> > ><br>
> > > I made the changes you mentioned and when I run it in the foreground it<br>
> > > seems to go just fine before eventually aborting. Will wifidog not run<br>
> > > indefinitely in the foreground of a terminal? When I run it in the<br>
> > backround<br>
> > > I see the following in syslog:<br>
> > ><br>
> > > Jul 28 15:14:03 wifidog wifidog[26746]: Reading configuration file<br>
> > > '/usr/local/etc/wifidog.conf'<br>
> > > Jul 28 15:14:03 wifidog wifidog[26746]: Forking into background<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Setting started_time<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Creating web server on<br>
> > > <a href="http://216.193.211.3:2060" target="_blank">216.193.211.3:2060</a><br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Removing Firewall rules<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Creating ICMP socket<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Initializing Firewall<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Waiting for connections<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: ONLINE status became ON<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Clearing the authservers list<br>
> > > Jul 28 15:14:03 wifidog wifidog[26748]: Setting the authservers list<br>
> > ><br>
> > ><br>
> > > However I don't see any process called wifidog running and when I look<br>
> > for<br>
> > > 2060 in netstat I don't see anything listening. I am confused.<br>
> > ><br>
> > > Thanks<br>
> > > Clifford<br>
> > ><br>
> > > On Mon, Jul 28, 2008 at 5:45 PM, Clifford Thurber <<a href="mailto:clifford@hdn.net">clifford@hdn.net</a>><br>
> > wrote:<br>
> > ><br>
> > > > I am running:<br>
> > > > Fedora release 9 (Sulphur) on an Intel Xeon. I am going to try the fix<br>
> > you<br>
> > > > suggested right now.<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > On Mon, Jul 28, 2008 at 5:20 PM, acv <<a href="mailto:acv@miniguru.ca">acv@miniguru.ca</a>> wrote:<br>
> > > ><br>
> > > >> I've reproduced the bug on Ubuntu 7.10 x86_64. The fix is trivial,<br>
> > > >> util.c must include <arpa/inet.h>. Right now this only happens if<br>
> > > >> __NetBSD__ is defined.<br>
> > > >><br>
> > > >> I've tested on Red Hat 7.3 (as a suitable substitute for antique<br>
> > > >> Linux platform and as an i386 32-bit platform) and there it works<br>
> > > >> regardless of whether <arpa/inet.h> is included. Although the man<br>
> > > >> page says it's required.<br>
> > > >><br>
> > > >> I don't have a 32-bit Ubuntu 7.10 to test whether 32-bit Linux as<br>
> > > >> a whole is exempt from including that file. I'll commit the include<br>
> > > >> to the SVN later today when I get home (hopefully I'll remember my<br>
> > > >> password.) If someone else wants to check it in, go ahead.<br>
> > > >><br>
> > > >> Temporary fix:<br>
> > > >><br>
> > > >> In src/util.c, cut line 45 (#include <arpa/inet.h>) and paste it<br>
> > > >> above line 44 (#if defined(__NetBSD__)).<br>
> > > >><br>
> > > >> Cheers,<br>
> > > >><br>
> > > >> Alex<br>
> > > >><br>
> > > >> On Mon, Jul 28, 2008 at 04:57:28PM -0400, acv wrote:<br>
> > > >> > Date: Mon, 28 Jul 2008 16:57:28 -0400<br>
> > > >> > From: acv <<a href="mailto:acv@miniguru.ca">acv@miniguru.ca</a>><br>
> > > >> > To: WiFiDog Captive Portal <<a href="mailto:wifidog@listes.ilesansfil.org">wifidog@listes.ilesansfil.org</a>><br>
> > > >> > Mail-Followup-To: WiFiDog Captive Portal <<br>
> > <a href="mailto:wifidog@listes.ilesansfil.org">wifidog@listes.ilesansfil.org</a><br>
> > > >> ><br>
> > > >> > Subject: Re: [isf-wifidog] seg fault<br>
> > > >> ><br>
> > > >> > On the surface, it looks like the bug is caused by inet_ntoa() not<br>
> > > >> returning<br>
> > > >> > a null-terminated string, that's why strlen() segfaults, it goes<br>
> > beyond<br>
> > > >> the<br>
> > > >> > end of the string. This could either be caused by inet_ntoa()<br>
> > failing or<br>
> > > >> > the ioctl() call failing or even the memcpy() bit just below.<br>
> > > >> ><br>
> > > >> > Code snippet (lines 176-185 from src/util.c):<br>
> > > >> ><br>
> > > >> > 176 if (ioctl (sockd, SIOCGIFADDR, &if_data) < 0) {<br>
> > > >> > 177 debug(LOG_ERR, "ioctl(): SIOCGIFADDR %s",<br>
> > > >> strerror(errno));<br>
> > > >> > 178 return NULL;<br>
> > > >> > 179 }<br>
> > > >> > 180 memcpy ((void *) &ip, (void *) &if_data.ifr_addr.sa_data<br>
> > + 2,<br>
> > > >> 4);<br>
> > > >> > 181 in.s_addr = ip;<br>
> > > >> > 182<br>
> > > >> > 183 ip_str = (char *)inet_ntoa(in);<br>
> > > >> > 184 close(sockd);<br>
> > > >> > 185 return safe_strdup(ip_str);<br>
> > > >> ><br>
> > > >> > ioctl() errors are checked. Either the memcpy() call or its<br>
> > > >> > pointer arithmetics is off? sa_data in a sockaddr_in struct starts<br>
> > > >> > with a 16-bit value so the math looks OK. This stumps me right now,<br>
> > > >> > what's the distro? Ubuntu 7.10?<br>
> > > >> ><br>
> > > >> > Alex<br>
> > > >> ><br>
> > > >> > On Mon, Jul 28, 2008 at 04:15:08PM -0400, Clifford Thurber wrote:<br>
> > > >> > > Date: Mon, 28 Jul 2008 16:15:08 -0400<br>
> > > >> > > From: "Clifford Thurber" <<a href="mailto:clifford@hdn.net">clifford@hdn.net</a>><br>
> > > >> > > To: "WiFiDog Captive Portal" <<a href="mailto:wifidog@listes.ilesansfil.org">wifidog@listes.ilesansfil.org</a>><br>
> > > >> > > Subject: Re: [isf-wifidog] seg fault<br>
> > > >> > ><br>
> > > >> > > [root@wifidog src]# ifconfig eth1<br>
> > > >> > > eth1 Link encap:Ethernet HWaddr 00:18:8B:2E:B1:A5<br>
> > > >> > > inet addr:<a href="http://216.193.211.3" target="_blank">216.193.211.3</a> Bcast:<a href="http://216.193.211.255" target="_blank">216.193.211.255</a> Mask:<br>
> > > >> <a href="http://255.255.255.0" target="_blank">255.255.255.0</a><br>
> > > >> > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br>
> > > >> > > RX packets:194391 errors:0 dropped:0 overruns:0 frame:0<br>
> > > >> > > TX packets:84 errors:0 dropped:0 overruns:0 carrier:0<br>
> > > >> > > collisions:0 txqueuelen:1000<br>
> > > >> > > RX bytes:12474968 (11.8 MiB) TX bytes:16381 (15.9 KiB)<br>
> > > >> > > Interrupt:16 Memory:f8000000-f8012100<br>
> > > >> > ><br>
> > > >> > > On Mon, Jul 28, 2008 at 4:11 PM, acv <<a href="mailto:acv@miniguru.ca">acv@miniguru.ca</a>> wrote:<br>
> > > >> > ><br>
> > > >> > > > On Mon, Jul 28, 2008 at 03:43:14PM -0400, Clifford Thurber<br>
> > wrote:<br>
> > > >> > > > ><br>
> > > >> > > > > Program received signal SIGSEGV, Segmentation fault.<br>
> > > >> > > > > 0x0000003ea6280eb0 in strlen () from /lib64/libc.so.6<br>
> > > >> > > > > Missing separate debuginfos, use: debuginfo-install<br>
> > glibc.x86_64<br>
> > > >> > > > > (gdb) bt<br>
> > > >> > > > > #0 0x0000003ea6280eb0 in strlen () from /lib64/libc.so.6<br>
> > > >> > > > > #1 0x0000003ea6280be6 in strdup () from /lib64/libc.so.6<br>
> > > >> > > > > #2 0x000000000040bfdc in safe_strdup ()<br>
> > > >> > > > > #3 0x0000000000409c64 in get_iface_ip ()<br>
> > > >> > > > > #4 0x000000000040720b in main_loop ()<br>
> > > >> > > > > #5 0x00000000004078a2 in main ()<br>
> > > >> > > > > (gdb) exit<br>
> > > >> > > ><br>
> > > >> > > > This is very strange. What's the output of ifconfig for<br>
> > that<br>
> > > >> > > > interface?<br>
> > > >> > > ><br>
> > > >> > > > Alex<br>
> > > >> > > ><br>
> > > >> > > > _______________________________________________<br>
> > > >> > > > WiFiDog mailing list<br>
> > > >> > > > <a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
> > > >> > > > <a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br>
> > > >> > > ><br>
> > > >> ><br>
> > > >> > > _______________________________________________<br>
> > > >> > > WiFiDog mailing list<br>
> > > >> > > <a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
> > > >> > > <a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >> > _______________________________________________<br>
> > > >> > WiFiDog mailing list<br>
> > > >> > <a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
> > > >> > <a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br>
> > > >><br>
> > > >> _______________________________________________<br>
> > > >> WiFiDog mailing list<br>
> > > >> <a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
> > > >> <a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br>
> > > >><br>
> > > ><br>
> > > ><br>
> ><br>
> > > _______________________________________________<br>
> > > WiFiDog mailing list<br>
> > > <a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
> > > <a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br>
> ><br>
> > _______________________________________________<br>
> > WiFiDog mailing list<br>
> > <a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
> > <a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br>
> ><br>
<br>
> _______________________________________________<br>
> WiFiDog mailing list<br>
> <a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
> <a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br>
</div></div><br>_______________________________________________<br>
WiFiDog mailing list<br>
<a href="mailto:WiFiDog@listes.ilesansfil.org">WiFiDog@listes.ilesansfil.org</a><br>
<a href="http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog" target="_blank">http://listes.ilesansfil.org/cgi-bin/mailman/listinfo/wifidog</a><br></blockquote></div><br></div>