another little pre-2.0.31 nit

Olaf Titz (olaf@bigred.inka.de)
Wed, 10 Sep 1997 22:04:52 +0200


This fix should still go into 2.0.31 if possible. The bug leads to
getsockname() reporting an unbound socket as bound to 127.0.0.1 (which
breaks libsocks5, and probably other things).

olaf

--- net/ipv4/af_inet.c Fri Aug 15 21:23:23 1997
+++ /usr/src/linux/net/ipv4/af_inet.c Thu Jun 5 15:55:53 1997
@@ -836,11 +836,8 @@
sin->sin_addr.s_addr = sk->daddr;
} else {
__u32 addr = sk->rcv_saddr;
- if (!addr) {
+ if (!addr)
addr = sk->saddr;
- if (!addr)
- addr = ip_my_addr();
- }
sin->sin_port = sk->dummy_th.source;
sin->sin_addr.s_addr = addr;
}

-- 
___        Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de       ____
__ o           <URL:http://www.inka.de/~bigred/>     <IRC:praetorius>
__/<_              >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____