Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Linux socket emulation change (was: CVS commit: src/sys/compat/linux/common)



In article <20040912153256.8C5E92DA1D%cvs.netbsd.org@localhost>,
        Jaromir Dolecek <jdolecek%NetBSD.org@localhost> writes:
> 
> Module Name:  src
> Committed By: jdolecek
> Date:         Sun Sep 12 15:32:56 UTC 2004
> 
> Modified Files:
>       src/sys/compat/linux/common: linux_socket.c
> 
> Log Message:
> if passed sockaddr has family AF_UNSPEC, use socket family of the socket
> the sockaddr is used for
> 
> this fixes bind() problem in Linux version of Theocracy, testing
> by Thomas Klausner

This change is not correct. Calling connect() with an AF_UNSPEC
sockaddr is well defined(*) interface to unconnect a UDP socket. Your
code changes have broken this. Please fix this issue and supply and
additional commit message which addresses this bug. I suggest that you
move the "bdom == AF_UNSPEC" hack linux_sys_bind() or add a boolean
argument to linux_sa_get() which allows to (de)activate it.

        Kind regards

(*) See "Unix Network Programming" by W. Richard Stevens, page 226
    "Calling connect Multiple Times for a UDP socket".

-- 
Matthias Scheler                                  http://scheler.de/~matthias/



Home | Main Index | Thread Index | Old Index