Re: [Bug 42012] New: regression on 2.6.39.3 with socket/bind; still there in 3.0.4
From: Eric Dumazet <hidden>
Date: 2011-08-30 20:00:56
From: Eric Dumazet <hidden>
Date: 2011-08-30 20:00:56
Le mardi 30 août 2011 à 15:52 -0400, David Miller a écrit :
From: Eric Dumazet <redacted> Date: Tue, 30 Aug 2011 21:44:19 +0200quoted
Status on FreeBSD 8.1-RELEASE bind(AF_UNSPEC) is accepted (converted to AF_INET), only with a 0.0.0.0 address. Following code works : struct sockaddr_in addr; fd = socket(PF_INET, SOCK_STREAM, 0); memset(&addr, 0, sizeof(addr)) bind(fd, (struct sockaddr *)&addr, sizeof(addr)); -> 0 If tried on ipv6 sockets, it doesnt work : bind() returns -1, errno=47Ok if we could add that 0.0.0.0 check too that would make me feel better about this change.
Sure, I will send a patch in a couple of minutes.