diff options
author | dlg <> | 2012-03-17 10:16:41 +0000 |
---|---|---|
committer | dlg <> | 2012-03-17 10:16:41 +0000 |
commit | 68c146dfc403870232da00ff9e7830c184b607fa (patch) | |
tree | d2d35d9a1c5c27cba9d137ecd1ebc2886f588e54 | |
parent | 00e45fb93e19fcfd936d49eb2339684375ec2d84 (diff) | |
download | openbsd-68c146dfc403870232da00ff9e7830c184b607fa.tar.gz openbsd-68c146dfc403870232da00ff9e7830c184b607fa.tar.bz2 openbsd-68c146dfc403870232da00ff9e7830c184b607fa.zip |
remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.
no objection from mcbride@ krw@ markus@ deraadt@
-rw-r--r-- | src/usr.bin/nc/netcat.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index cc4683aa32..c0a0e474a5 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ | 1 | /* $OpenBSD: netcat.c,v 1.106 2012/03/17 10:16:41 dlg Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> | 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> |
4 | * | 4 | * |
@@ -67,7 +67,6 @@ | |||
67 | /* Command Line Options */ | 67 | /* Command Line Options */ |
68 | int dflag; /* detached, no stdin */ | 68 | int dflag; /* detached, no stdin */ |
69 | unsigned int iflag; /* Interval Flag */ | 69 | unsigned int iflag; /* Interval Flag */ |
70 | int jflag; /* use jumbo frames if we can */ | ||
71 | int kflag; /* More than one connect */ | 70 | int kflag; /* More than one connect */ |
72 | int lflag; /* Bind to local port */ | 71 | int lflag; /* Bind to local port */ |
73 | int nflag; /* Don't do name look up */ | 72 | int nflag; /* Don't do name look up */ |
@@ -131,7 +130,7 @@ main(int argc, char *argv[]) | |||
131 | sv = NULL; | 130 | sv = NULL; |
132 | 131 | ||
133 | while ((ch = getopt(argc, argv, | 132 | while ((ch = getopt(argc, argv, |
134 | "46DdhI:i:jklnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) { | 133 | "46DdhI:i:klnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) { |
135 | switch (ch) { | 134 | switch (ch) { |
136 | case '4': | 135 | case '4': |
137 | family = AF_INET; | 136 | family = AF_INET; |
@@ -163,9 +162,6 @@ main(int argc, char *argv[]) | |||
163 | if (errstr) | 162 | if (errstr) |
164 | errx(1, "interval %s: %s", errstr, optarg); | 163 | errx(1, "interval %s: %s", errstr, optarg); |
165 | break; | 164 | break; |
166 | case 'j': | ||
167 | jflag = 1; | ||
168 | break; | ||
169 | case 'k': | 165 | case 'k': |
170 | kflag = 1; | 166 | kflag = 1; |
171 | break; | 167 | break; |
@@ -358,7 +354,7 @@ main(int argc, char *argv[]) | |||
358 | struct sockaddr_storage z; | 354 | struct sockaddr_storage z; |
359 | 355 | ||
360 | len = sizeof(z); | 356 | len = sizeof(z); |
361 | plen = jflag ? 16384 : 2048; | 357 | plen = 2048; |
362 | rv = recvfrom(s, buf, plen, MSG_PEEK, | 358 | rv = recvfrom(s, buf, plen, MSG_PEEK, |
363 | (struct sockaddr *)&z, &len); | 359 | (struct sockaddr *)&z, &len); |
364 | if (rv < 0) | 360 | if (rv < 0) |
@@ -717,7 +713,7 @@ readwrite(int nfd) | |||
717 | int lfd = fileno(stdout); | 713 | int lfd = fileno(stdout); |
718 | int plen; | 714 | int plen; |
719 | 715 | ||
720 | plen = jflag ? 16384 : 2048; | 716 | plen = 2048; |
721 | 717 | ||
722 | /* Setup Network FD */ | 718 | /* Setup Network FD */ |
723 | pfd[0].fd = nfd; | 719 | pfd[0].fd = nfd; |
@@ -896,11 +892,6 @@ set_common_sockopts(int s) | |||
896 | &x, sizeof(x)) == -1) | 892 | &x, sizeof(x)) == -1) |
897 | err(1, NULL); | 893 | err(1, NULL); |
898 | } | 894 | } |
899 | if (jflag) { | ||
900 | if (setsockopt(s, SOL_SOCKET, SO_JUMBO, | ||
901 | &x, sizeof(x)) == -1) | ||
902 | err(1, NULL); | ||
903 | } | ||
904 | if (Tflag != -1) { | 895 | if (Tflag != -1) { |
905 | if (setsockopt(s, IPPROTO_IP, IP_TOS, | 896 | if (setsockopt(s, IPPROTO_IP, IP_TOS, |
906 | &Tflag, sizeof(Tflag)) == -1) | 897 | &Tflag, sizeof(Tflag)) == -1) |