After upgrading to linux kernel 3.0.0, my haproxy stopped working.

By using debug option, I find that transparent with usesrc client
stopped working. It alters:

        [ALERT]: Cannot bind to source address before connect() for
proxy %s. Aborting.

It worked correctly when I was using kernel 2.6.29. So that I checked
into source code, and find that in src/proto_tcp.c:141,
bind() returned 97 (EAFNOSUPPORT). I can't understand why it failed
after successfully setsockopt(..., IP_TRANSPARENT, ...).

Since perror says "Address family not supported", I find that after
memset() bind_addr to 0 at src/proto_tcp.c:132, bind_addr.sin_family
is uninitialized. After I add bind_addr.sin_family = AF_INET; below
memset(), recompile haproxy then it works again.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-1-686-pae (SMP w/2 CPU cores)

-- 
Sincerely,
    Yang Zhe

Reply via email to