diff -urN linux-2.4.33-wt3/net/core/sock.c linux-2.4.33-wt3.reuseport/net/core/sock.c --- linux-2.4.33-wt3/net/core/sock.c Sat Jul 31 18:45:19 2004 +++ linux-2.4.33-wt3.reuseport/net/core/sock.c Mon Nov 13 00:18:00 2006 @@ -215,7 +215,16 @@ sk->debug=valbool; break; case SO_REUSEADDR: - sk->reuse = valbool; + if (valbool) + sk->reuse |= 1; + else + sk->reuse &= ~1; + break; + case SO_REUSEPORT: + if (valbool) + sk->reuse |= 2; + else + sk->reuse &= ~2; break; case SO_TYPE: case SO_ERROR: @@ -466,7 +475,11 @@ break; case SO_REUSEADDR: - v.val = sk->reuse; + v.val = (sk->reuse & 1) != 0; + break; + + case SO_REUSEPORT: + v.val = (sk->reuse & 2) != 0; break; case SO_KEEPALIVE: