add a simple maintenance tool for kernel config files
[openwrt.git] / package / busybox / patches / 110-telnetd.patch
index f14143a..8ebb6de 100644 (file)
@@ -1,7 +1,7 @@
-diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnetd.c
---- busybox-1.1.0/networking/telnetd.c 2006-01-11 06:43:51.000000000 +0100
-+++ busybox-1.1.0-owrt/networking/telnetd.c    2006-01-14 17:41:20.000000000 +0100
-@@ -45,6 +45,7 @@
+diff -ruN busybox-1.2.0-old/networking/telnetd.c busybox-1.2.0-new/networking/telnetd.c
+--- busybox-1.2.0-old/networking/telnetd.c     2006-07-01 00:42:02.000000000 +0200
++++ busybox-1.2.0-new/networking/telnetd.c     2006-07-31 10:52:30.000000000 +0200
+@@ -44,6 +44,7 @@
  #include <arpa/telnet.h>
  #include <ctype.h>
  #include <sys/syslog.h>
@@ -9,7 +9,7 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet
  
  #include "busybox.h"
  
-@@ -394,11 +395,13 @@
+@@ -391,11 +392,13 @@
        struct in_addr bind_addr = { .s_addr = 0x0 };
  #endif /* CONFIG_FEATURE_TELNETD_INETD */
        int c;
@@ -25,7 +25,7 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet
  #endif /* CONFIG_FEATURE_TELNETD_INETD */
        int maxlen, w, r;
  
-@@ -413,6 +416,9 @@
+@@ -410,6 +413,9 @@
                        case 'f':
                                issuefile = optarg;
                                break;
@@ -35,17 +35,17 @@ diff -ur busybox-1.1.0/networking/telnetd.c busybox-1.1.0-owrt/networking/telnet
                        case 'l':
                                loginpath = optarg;
                                break;
-@@ -465,6 +471,13 @@
+@@ -459,6 +465,13 @@
        sa.sin_addr = bind_addr;
  #endif
  
-+      /* Set it to listen on the specified interface */
-+      if (interface_name) {
-+              strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ);
-+              (void)setsockopt(master_fd, SOL_SOCKET,
-+                              SO_BINDTODEVICE, &interface, sizeof(interface));
-+      }
-+
-       if (bind(master_fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
-               bb_perror_msg_and_die("bind");
-       }
++      /* Set it to listen on the specified interface */
++      if (interface_name) {
++              strncpy(interface.ifr_ifrn.ifrn_name, interface_name, IFNAMSIZ);
++              (void)setsockopt(master_fd, SOL_SOCKET,
++                              SO_BINDTODEVICE, &interface, sizeof(interface));
++      }
++ 
+       bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa));
+       bb_xlisten(master_fd, 1);
+       bb_xdaemon(0, 0);
This page took 0.025613 seconds and 4 git commands to generate.