From: Amos Jeffries Date: Mon, 7 Apr 2008 22:05:09 +0000 (+1200) Subject: Transparent flag must be done before bind(). X-Git-Tag: BASIC_TPROXY4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a35595cde3981998c2483c81c4507c22ec289ad6;p=thirdparty%2Fsquid.git Transparent flag must be done before bind(). Also fix a small cut-n-paste error with #endif. --- a35595cde3981998c2483c81c4507c22ec289ad6 diff --cc src/comm.cc index 384f574523,513c71a2ce..526a4de25f --- a/src/comm.cc +++ b/src/comm.cc @@@ -754,6 -734,6 +754,13 @@@ comm_openex(int sock_type commSetReuseAddr(new_socket); } ++#if LINUX_TPROXY4 ++ /* MUST be done before binding or face OS Error: "(99) Cannot assign requested address"... */ ++ if((flags & COMM_TRANSPARENT)) { ++ comm_set_transparent(new_socket); ++ } ++#endif ++ if (!addr.IsNoAddr()) { if (commBind(new_socket, *AI) != COMM_OK) {