Blame SOURCES/telnet-rh674942.patch

ce2f68
--- netkit-telnet-0.17/telnetd/telnetd.c.orig	2011-01-31 12:05:37.942942871 -0600
ce2f68
+++ netkit-telnet-0.17/telnetd/telnetd.c	2011-01-31 18:20:22.400743499 -0600
ce2f68
@@ -82,6 +82,7 @@ char	ptyibuf2[BUFSIZ];
ce2f68
 int	hostinfo = 1;			/* do we print login banner? */
ce2f68
 
ce2f68
 int debug = 0;
ce2f68
+int debugsix = 0;
ce2f68
 int keepalive = 1;
ce2f68
 char *loginprg = _PATH_LOGIN;
ce2f68
 char *progname;
ce2f68
@@ -150,8 +151,11 @@ main(int argc, char *argv[], char *env[]
ce2f68
 #endif /* BFTPDAEMON */
ce2f68
 
ce2f68
 		case 'd':
ce2f68
-			if (strcmp(optarg, "ebug") == 0) {
ce2f68
+			if (strncmp(optarg, "ebug", 4) == 0) {
ce2f68
 				debug++;
ce2f68
+				if (strncmp(optarg, "ebug6", 5) == 0) {
ce2f68
+					debugsix++;
ce2f68
+				}
ce2f68
 				break;
ce2f68
 			}
ce2f68
 			usage();
ce2f68
@@ -271,6 +275,8 @@ main(int argc, char *argv[], char *env[]
ce2f68
 	        hints.ai_socktype = SOCK_STREAM;
ce2f68
 	        hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE;
ce2f68
 	        hints.ai_protocol = IPPROTO_TCP;
ce2f68
+		if (debugsix)
ce2f68
+			hints.ai_family = AF_INET6;
ce2f68
 
ce2f68
 	        if (argc == 0) {
ce2f68
 	            if (getaddrinfo(NULL, "telnet", &hints, &ai) != 0) {
ce2f68
@@ -380,12 +386,12 @@ usage(void)
ce2f68
 {
ce2f68
 	fprintf(stderr, "Usage: telnetd");
ce2f68
 #ifdef	AUTHENTICATE
ce2f68
-	fprintf(stderr, " [-a (debug|other|user|valid|off)]\n\t");
ce2f68
+	fprintf(stderr, " [-a (debug|debug6|other|user|valid|off)]\n\t");
ce2f68
 #endif
ce2f68
 #ifdef BFTPDAEMON
ce2f68
 	fprintf(stderr, " [-B]");
ce2f68
 #endif
ce2f68
-	fprintf(stderr, " [-debug]");
ce2f68
+	fprintf(stderr, " [-debug|-debug6]");
ce2f68
 #ifdef DIAGNOSTICS
ce2f68
 	fprintf(stderr, " [-D (options|report|exercise|netdata|ptydata)]\n\t");
ce2f68
 #endif