Sophie

Sophie

distrib > Mageia > 2 > i586 > media > core-release-src > by-pkgid > 2b363aae8e38b25f9edaf0de1b493f79 > files > 26

netcat-traditional-1.10-35.mga1.src.rpm

Summary: Always use getservbyport.
Contributor: Decklin Foster <decklin@red-bean.com>

Index: netcat-1.10/netcat.c
===================================================================
--- netcat-1.10.orig/netcat.c	2006-03-24 12:26:39.000000000 -0500
+++ netcat-1.10/netcat.c	2006-03-24 12:26:40.000000000 -0500
@@ -462,8 +462,10 @@
     if (pstring)			/* one or the other, pleeze */
       return (0);
     x = pnum;
-    if (o_nflag)			/* go faster, skip getservbyblah */
-      goto gp_finish;
+    /* disabled, see bug #98902. if this is *really* slowing someone
+     * down I'll reconsider. */
+    /* if (o_nflag) */			/* go faster, skip getservbyblah */
+      /* goto gp_finish; */
     y = htons (x);			/* gotta do this -- see Fig.1 below */
     servent = getservbyport (y, whichp);
     if (servent) {