summaryrefslogtreecommitdiff
path: root/regress/netcat.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-02-21 11:57:14 +0000
committerColin Watson <cjwatson@debian.org>2020-02-21 11:57:14 +0000
commitf0de78bd4f29fa688c5df116f3f9cd43543a76d0 (patch)
tree856b0dee3f2764c13a32dad5ffe2424fab7fef41 /regress/netcat.c
parent4213eec74e74de6310c27a40c3e9759a08a73996 (diff)
parent8aa3455b16fddea4c0144a7c4a1edb10ec67dcc8 (diff)
Import openssh_8.2p1.orig.tar.gz
Diffstat (limited to 'regress/netcat.c')
-rw-r--r--regress/netcat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/regress/netcat.c b/regress/netcat.c
index 56bd09de5..2d86818e2 100644
--- a/regress/netcat.c
+++ b/regress/netcat.c
@@ -1181,11 +1181,13 @@ set_common_sockopts(int s)
1181 &x, sizeof(x)) == -1) 1181 &x, sizeof(x)) == -1)
1182 err(1, "setsockopt"); 1182 err(1, "setsockopt");
1183 } 1183 }
1184#ifdef IP_TOS
1184 if (Tflag != -1) { 1185 if (Tflag != -1) {
1185 if (setsockopt(s, IPPROTO_IP, IP_TOS, 1186 if (setsockopt(s, IPPROTO_IP, IP_TOS,
1186 &Tflag, sizeof(Tflag)) == -1) 1187 &Tflag, sizeof(Tflag)) == -1)
1187 err(1, "set IP ToS"); 1188 err(1, "set IP ToS");
1188 } 1189 }
1190#endif
1189 if (Iflag) { 1191 if (Iflag) {
1190 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, 1192 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
1191 &Iflag, sizeof(Iflag)) == -1) 1193 &Iflag, sizeof(Iflag)) == -1)
@@ -1201,6 +1203,7 @@ set_common_sockopts(int s)
1201int 1203int
1202map_tos(char *s, int *val) 1204map_tos(char *s, int *val)
1203{ 1205{
1206#ifdef IP_TOS
1204 /* DiffServ Codepoints and other TOS mappings */ 1207 /* DiffServ Codepoints and other TOS mappings */
1205 const struct toskeywords { 1208 const struct toskeywords {
1206 const char *keyword; 1209 const char *keyword;
@@ -1242,6 +1245,7 @@ map_tos(char *s, int *val)
1242 return (1); 1245 return (1);
1243 } 1246 }
1244 } 1247 }
1248#endif
1245 1249
1246 return (0); 1250 return (0);
1247} 1251}