diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-13 22:51:49 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-03-20 17:29:15 +0100 |
commit | 60c1f0f64d23003a19a07d6b9638542130f6641d (patch) | |
tree | 8fb2787f4c49baded97cd55e0c371fe1cffce2b6 /package/busybox/patches/110-telnetd.patch | |
parent | d58a09110ccfa95f06c983fe796806f2e035c9d2 (diff) | |
parent | b3ce218b51746d3a576221ea542facf3a1703ab2 (diff) | |
download | upstream-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.gz upstream-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.bz2 upstream-60c1f0f64d23003a19a07d6b9638542130f6641d.zip |
finally move buildroot-ng to trunk
Diffstat (limited to 'package/busybox/patches/110-telnetd.patch')
-rw-r--r-- | package/busybox/patches/110-telnetd.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/package/busybox/patches/110-telnetd.patch b/package/busybox/patches/110-telnetd.patch new file mode 100644 index 0000000000..8ebb6de645 --- /dev/null +++ b/package/busybox/patches/110-telnetd.patch @@ -0,0 +1,51 @@ +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> ++#include <net/if.h> + + #include "busybox.h" + +@@ -391,11 +392,13 @@ + struct in_addr bind_addr = { .s_addr = 0x0 }; + #endif /* CONFIG_FEATURE_TELNETD_INETD */ + int c; ++ char *interface_name = NULL; ++ struct ifreq interface; + static const char options[] = + #ifdef CONFIG_FEATURE_TELNETD_INETD +- "f:l:"; ++ "i:f:l:"; + #else /* CONFIG_EATURE_TELNETD_INETD */ +- "f:l:p:b:"; ++ "i:f:l:p:b:"; + #endif /* CONFIG_FEATURE_TELNETD_INETD */ + int maxlen, w, r; + +@@ -410,6 +413,9 @@ + case 'f': + issuefile = optarg; + break; ++ case 'i': ++ interface_name = strdup(optarg); ++ break; + case 'l': + loginpath = optarg; + break; +@@ -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)); ++ } ++ + bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa)); + bb_xlisten(master_fd, 1); + bb_xdaemon(0, 0); |