Darren Tucker
837ffa9699
Omit ToS setting if we don't have IPV6_TCLASS too.
...
Fixes tests on old BSDs.
2020-05-29 20:39:00 +10:00
sobrado
0b0d219313
partial sync of regress/netcat.c with upstream
...
synchronize synopsis and usage.
2020-05-29 14:48:02 +10:00
chl
0f04c8467f
partial sync of regress/netcat.c with upstream
...
remove unused variable
ok tedu@
2020-05-29 14:47:56 +10:00
tobias
d6a81050ac
partial sync of regress/netcat.c with upstream
...
The code in socks.c writes multiple times in a row to a socket. If the socket becomes invalid between these calls (e.g. connection closed), write will throw SIGPIPE. With this patch, SIGPIPE is ignored so we can handle write's -1 return value (errno will be EPIPE). Ultimately, it leads to program exit, too -- but with nicer error message. :)
with input by and ok djm
2020-05-29 14:47:50 +10:00
tobias
bf3893dddd
partial sync of regress/netcat.c with upstream
...
Check for short writes in fdpass(). Clean up while at it.
ok djm
2020-05-29 14:47:41 +10:00
jca
e18435fec1
partial sync of regress/netcat.c with upstream
...
Support for nc -T on IPv6 addresses.
ok sthen@
2020-05-29 14:47:11 +10:00
Damien Miller
90a0b434ed
fix reversed test
2020-05-01 13:55:03 +10:00
Darren Tucker
7f23f42123
Include sys/byteorder.h for htons and friends.
...
These are usually in netinet/in.h but on HP-UX they are not defined if
_XOPEN_SOURCE_EXTENDED is set. Only needed for netcat in the regression
tests.
2020-05-01 12:51:36 +10:00
Darren Tucker
d500b59a82
Check if IP_TOS is defined before using.
2019-11-01 13:42:52 +11:00
Darren Tucker
aee49b2a89
Set SO_REUSEADDR in regression test netcat.
...
Sometimes multiplex tests fail on Solaris with "netcat: local_listen:
Address already in use" which is likely due to previous invocations
leaving the port in TIME_WAIT. Set SO_REUSEADDR (in addition to
SO_REUSEPORT which is alread set on platforms that support it). ok djm@
2018-02-08 12:42:12 +11:00
Damien Miller
8aaec70506
fix missing include for systems with err.h
2016-07-14 09:48:48 +10:00
Darren Tucker
6310ef27a2
Move err.h replacements into compat lib.
...
Move implementations of err.h replacement functions into their own file
in the libopenbsd-compat so we can use them in kexfuzz.c too. ok djm@
2016-07-13 14:42:35 +10:00
Damien Miller
673a1c16ad
remove dependency on arpa/telnet.h
2015-04-16 11:40:35 +10:00
Damien Miller
a05adf95d2
netcat needs poll.h portability goop
2015-03-04 11:00:35 -08:00
Damien Miller
2fab9b0f87
avoid warning
2015-03-04 07:41:27 +11:00
Damien Miller
e47536ba96
portability fixes for regress/netcat.c
...
Mostly avoiding "err(1, NULL)"
2015-02-28 08:20:11 -08:00
Damien Miller
1ad3a77cc9
make regress/netcat.c fd passing (more) portable
2015-02-26 20:34:06 -08:00
Tim Rice
13af342458
Original portability patch from djm@ for platforms missing err.h.
...
Fix name space clash on Solaris 10. Still more to do for Solaris 10
to deal with msghdr structure differences. ok djm@
2015-02-24 07:56:47 -08:00
Damien Miller
69ff64f696
compile on systems without TCP_MD5SIG (e.g. OSX)
2015-01-27 23:07:43 +11:00
Damien Miller
c332110291
some systems lack SO_REUSEPORT
2015-01-15 02:59:51 +11:00
Damien Miller
293cac52dc
include and use OpenBSD netcat in regress/
2014-12-23 08:38:12 +11:00