[fixed] Re: linuxulator problems in linux_socket.c (and friends)

Andrew Atrens atrens at nortelnetworks.com
Thu Jan 8 13:06:22 PST 2004


The following patch works around the problem, but is probably not as correct
as it could be -

Index: linux_socket.c
===================================================================
RCS file: /usr/dfly/repo/src/sys/emulation/linux/linux_socket.c,v
retrieving revision 1.15
retrieving revision 1.15.2.13
diff -b -B -r1.15 -r1.15.2.13
678a678,681
> 
>       if (error == ENOPROTOOPT) /* not a rawip proto socket */
>               error = optval = 0; /* we know IP_HDRINCL is not set */
> 



looks like the probable root cause is that IP_HDRINCL sockopt is only
handled for IPRAW sockets but the linux_sendto() code doesn't test for this
before calling kern_getsockopt() ...

there might be some subtlety that I'm missing here but on the surface that
seems to be it ... :)

Cheers,

Andrew.







More information about the Bugs mailing list