Implemented fix-socket patch master debian/3.3+dfsg-3kali0
authorMati Aharoni (Kali Linux Developer) <muts@kali.org>
Wed, 15 Jan 2014 21:49:56 +0000 (16:49 -0500)
committerMati Aharoni (Kali Linux Developer) <muts@kali.org>
Wed, 15 Jan 2014 21:49:56 +0000 (16:49 -0500)
debian/changelog
debian/patches/08-fix-socket.patch [new file with mode: 0644]
debian/patches/series

index e608089..5ce552f 100644 (file)
@@ -1,3 +1,9 @@
+httptunnel (3.3+dfsg-3kali0) kali; urgency=low
+
+  * Implemented fix-socket patch
+
+ -- Mati Aharoni <muts@kali.org>  Wed, 15 Jan 2014 16:49:27 -0500
+
 httptunnel (3.3+dfsg-3) unstable; urgency=low
 
   * Bump to debhelper v9.
diff --git a/debian/patches/08-fix-socket.patch b/debian/patches/08-fix-socket.patch
new file mode 100644 (file)
index 0000000..31543da
--- /dev/null
@@ -0,0 +1,96 @@
+diff --git a/tunnel.c b/tunnel.c
+index 2edc05c..d7b8c0d 100644
+--- a/tunnel.c
++++ b/tunnel.c
+@@ -140,30 +140,25 @@ struct tunnel
+ tunnel_in_setsockopts (int fd)
+ {
+ #ifdef SO_RCVLOWAT
+-  int tcp = get_proto_number ("tcp");
++  int i, n;
+-  if (tcp != -1)
+-    {
+-      int i, n;
+-
+-      i = 1;
+-      if (setsockopt (fd,
+-                    tcp,
+-                    SO_RCVLOWAT,
+-                    (void *)&i,
+-                    sizeof i) == -1)
+-      {
+-        log_debug ("tunnel_in_setsockopts: non-fatal SO_RCVLOWAT error: %s",
+-                   strerror (errno));
+-      }
+-      n = sizeof i;
+-      getsockopt (fd,
+-                tcp,
++  i = 1;
++  if (setsockopt (fd,
++                SOL_SOCKET,
+                 SO_RCVLOWAT,
+                 (void *)&i,
+-                &n);
+-      log_debug ("tunnel_out_setsockopts: SO_RCVLOWAT: %d", i);
++                sizeof i) == -1)
++    {
++      log_debug ("tunnel_in_setsockopts: non-fatal SO_RCVLOWAT error: %s",
++                strerror (errno));
+     }
++  n = sizeof i;
++  getsockopt (fd,
++            SOL_SOCKET,
++            SO_RCVLOWAT,
++            (void *)&i,
++            &n);
++  log_debug ("tunnel_out_setsockopts: SO_RCVLOWAT: %d", i);
+ #endif /* SO_RCVLOWAT */
+   return 0;
+@@ -174,30 +169,26 @@ struct tunnel
+ {
+ #ifdef SO_SNDLOWAT
+   {
+-    int tcp = get_proto_number ("tcp");
+     int i, n;
+  
+-    if (tcp != -1)
+-      {
+-      i = 1;
+-      if (setsockopt (fd,
+-                      tcp,
+-                      SO_SNDLOWAT,
+-                      (void *)&i,
+-                      sizeof i) == -1)
+-        {
+-          log_debug ("tunnel_out_setsockopts: "
+-                     "non-fatal SO_SNDLOWAT error: %s",
+-                     strerror (errno));
+-        }
+-      n = sizeof i;
+-      getsockopt (fd,
+-                  tcp,
++    i = 1;
++    if (setsockopt (fd,
++                  SOL_SOCKET,
+                   SO_SNDLOWAT,
+                   (void *)&i,
+-                  &n);
+-      log_debug ("tunnel_out_setsockopts: non-fatal SO_SNDLOWAT: %d", i);
++                  sizeof i) == -1)
++      {
++      log_debug ("tunnel_out_setsockopts: "
++                  "non-fatal SO_SNDLOWAT error: %s",
++                  strerror (errno));
+       }
++    n = sizeof i;
++    getsockopt (fd,
++              SOL_SOCKET,
++              SO_SNDLOWAT,
++              (void *)&i,
++              &n);
++    log_debug ("tunnel_out_setsockopts: non-fatal SO_SNDLOWAT: %d", i);
+   }
+ #endif /* SO_SNDLOWAT */
index d075247..958c09a 100644 (file)
@@ -5,3 +5,4 @@
 05-update-email-address.patch
 06-fix-cppflags-usage.patch
 07-quote-autoconf-definitions.patch
+08-fix-socket.patch