You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.5 KiB

Index: netcat.c
--- netcat.c.orig 2015-08-14 10:44:12.653115000 +0200
+++ netcat.c 2015-08-14 10:48:00.423134994 +0200
@@ -92,7 +92,9 @@
int Oflag; /* TCP send buffer size */
int Sflag; /* TCP MD5 signature option */
int Tflag = -1; /* IP Type of Service */
+#if 0
int rtableid = -1;
+#endif
int timeout = -1;
int family = AF_UNSPEC;
@@ -207,12 +209,14 @@
case 'u':
uflag = 1;
break;
+#if 0
case 'V':
rtableid = (int)strtonum(optarg, 0,
RT_TABLEID_MAX, &errstr);
if (errstr)
errx(1, "rtable %s: %s", errstr, optarg);
break;
+#endif
case 'v':
vflag = 1;
break;
@@ -595,16 +599,20 @@
res0->ai_protocol)) < 0)
continue;
+#if 0
if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_RTABLE,
&rtableid, sizeof(rtableid)) == -1))
err(1, "setsockopt SO_RTABLE");
+#endif
/* Bind to a local port or source address if specified. */
if (sflag || pflag) {
struct addrinfo ahints, *ares;
/* try SO_BINDANY, but don't insist */
+#ifdef SO_BINDANY
setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
+#endif
memset(&ahints, 0, sizeof(struct addrinfo));
ahints.ai_family = res0->ai_family;
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
@@ -704,9 +712,11 @@
res0->ai_protocol)) < 0)
continue;
+#if 0
if (rtableid >= 0 && (setsockopt(s, SOL_SOCKET, SO_RTABLE,
&rtableid, sizeof(rtableid)) == -1))
err(1, "setsockopt SO_RTABLE");
+#endif
ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
if (ret == -1)