]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2454: IPFWInterception getsockname() test is inverted
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 11 Sep 2008 11:19:43 +0000 (23:19 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 11 Sep 2008 11:19:43 +0000 (23:19 +1200)
src/IPInterception.cc

index 2c493248cfc9b8040dafb49b1fbea0c5ae01e5ce..3615988694049d7a97dac1cb11172e6980b51206 100644 (file)
@@ -198,7 +198,7 @@ IPIntercept::IPFWInterception(int fd, const IPAddress &me, IPAddress &dst, int s
 
     /** \par
      * Try lookup for IPFW interception. */
-    if( getsockname(fd, lookup->ai_addr, &lookup->ai_addrlen) >= 0 ) {
+    if( getsockname(fd, lookup->ai_addr, &lookup->ai_addrlen) != 0 ) {
         if( !silent ) {
             debugs(89, DBG_IMPORTANT, HERE << " IPFW getsockname(...) failed: " << xstrerror());
             last_reported = squid_curtime;