ioctl(DIOCNATLOOK) failed: Inappropriate ioctl for device

Fabian Keil freebsd-listen at fabiankeil.de
Mon Dec 4 11:57:13 UTC 2006


Nick Mathewson <nickm at freehaven.net> wrote:

> On Sat, Dec 02, 2006 at 05:03:37PM +0100, Fabian Keil wrote:
>  [..]
> > This would be one way to fix it:
> > 
> > --- connection_edge.c.orig      Fri Oct 20 21:11:15 2006
> > +++ connection_edge.c   Sat Dec  2 16:51:52 2006
> > @@ -1309,6 +1309,7 @@
> >    }
> >  
> >    pf_socket = pf;
> > +  return pf_socket;
> >  }
> 
> Thanks, and good catch!  I'm applying your fix now.
> 
> (Also, I'd be quite surprised if this compiled without warnings about
> a missing return statement.  Tor is supposed to compile without
> warnings everywhere, so if you run into warnings, please drop the
> developers a line.)

I was surprised as well, but I didn't get any warnings
with my default compiler settings.

Looks like my gcc "optimises" the expected:

connection_edge.c: In function `get_pf_socket':
connection_edge.c:1312: warning: control reaches end of non-void function

away if one compiles with -O2. Interesting.

Fabian
-- 
http://www.fabiankeil.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20061204/5cde3fac/attachment.pgp>


More information about the tor-dev mailing list