Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add missing colon after "Peer name" in verbose output. Mentioned on the | mmcc | 2015-12-17 | 1 | -2/+2 | |
| | | | | lists recently. | |||||
* | clean up some unused variables, and add the printing of the certificate validity | beck | 2015-12-16 | 1 | -4/+7 | |
| | | | | | to the verbose output when using tls - from rob@2keys.ca ok mmcc@ jsing@ deraadt@ | |||||
* | Specify SOCKS version in error messages. ok deraadt@ | mmcc | 2015-12-10 | 1 | -3/+3 | |
| | ||||||
* | Map SOCKS error codes to error strings. With input from deraadt@ | mmcc | 2015-12-10 | 1 | -5/+61 | |
| | ||||||
* | pledge nc better - Load the certificate into memory and then do the pledge, | beck | 2015-12-08 | 1 | -5/+21 | |
| | | | | | this allows us to drop the rpath fromt the nc pledge. ok deraadt@, tedu@ | |||||
* | Get rid of modulo bias and replace the naive shuffle by the | tb | 2015-12-07 | 1 | -20/+16 | |
| | | | | | | | | Knuth-Fisher-Yates shuffle to make the random sequence of ports less biased. Based on the implementation in sys/netinet/ip_id.c. With helpful input from daniel@ and beck@ ok beck@ despite eye twitching | |||||
* | rename variable 'sun' to allow building on Solaris | bcook | 2015-11-23 | 1 | -13/+13 | |
| | | | | ok deraadt@ | |||||
* | Since rtable was hoisted to the top with setrtable, it should have no | deraadt | 2015-11-13 | 1 | -10/+7 | |
| | | | | | bearing on the following pledge setups anymore. ok benno | |||||
* | with -V argument, dont set rtable on the socket, instead set if for the whole | benno | 2015-11-12 | 1 | -15/+4 | |
| | | | | | | | | | process, before pledge(). This way the rtable can be pledged too. the discussion about removing -V is postponed. diff from beck@, i wrote the same diff without seeing his, and various people at u2k15 agreed this is the right thing to do. ok phessler@ | |||||
* | KNF; from Rob Pierce | deraadt | 2015-11-01 | 1 | -3/+3 | |
| | ||||||
* | Initial pledge of netcat - unfortunately flawed because fiddling the rtableid | beck | 2015-10-23 | 1 | -1/+27 | |
| | | | | | | | in a socket option can be pretty scary and there is no better interface for this. so if the -V option is used you get no pledge at all.. Otherwise, do what works for the various options. Still needs refinement for tls to drop rpath, and a better solution for the routing table stuff | |||||
* | Userspace doesn't need to use SUN_LEN(): connect() and bind() must accept | guenther | 2015-10-11 | 1 | -8/+3 | |
| | | | | | | sizeof(struct sockaddr_un), so do the simple, portable thing ok beck@ deraadt@ | |||||
* | avoid trailing .Ns, reduce .Xo and .Sm, drop redundant .Bk | schwarze | 2015-09-25 | 1 | -12/+4 | |
| | ||||||
* | display negotiated TLS version and cipher suite in verbose mode. | beck | 2015-09-13 | 1 | -2/+3 | |
| | | | | ok jsing@ | |||||
* | Adapt to just committed libtls api change | beck | 2015-09-12 | 1 | -21/+14 | |
| | ||||||
* | use SOCK_CLOEXEC instead of fnctl; ok guenther beck jsing | deraadt | 2015-09-12 | 1 | -12/+16 | |
| | ||||||
* | fix previous; | jmc | 2015-09-12 | 2 | -31/+48 | |
| | ||||||
* | spaces found during a read | deraadt | 2015-09-11 | 1 | -19/+18 | |
| | ||||||
* | Add TLS suppport to nc. Provides a useful little test and script tool. | beck | 2015-09-11 | 3 | -45/+346 | |
| | | | | ok jsing@ bluhm@ | |||||
* | Netcat could hang during write(2) although poll(2) reports that the | bluhm | 2015-09-08 | 1 | -15/+6 | |
| | | | | | | | | | socket is writeable. This happens because netcat tries to write more than the low water mark of the socket write buffer. With a non-blocking socket you may get a short write, otherwise it blocks. The latter could cause a total hang of the netcat process depending on the upper protocol. So make the network connection non-blocking. OK claudio@ millert@ | |||||
* | synchronize synopsis and usage. | sobrado | 2015-09-03 | 1 | -2/+2 | |
| | ||||||
* | remove unused variable | chl | 2015-07-26 | 1 | -2/+2 | |
| | | | | ok tedu@ | |||||
* | The code in socks.c writes multiple times in a row to a socket. If the | tobias | 2015-03-26 | 1 | -3/+6 | |
| | | | | | | | | | 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 | |||||
* | Fix error message in case of write failure. | tobias | 2015-03-26 | 1 | -3/+3 | |
| | | | | ok djm | |||||
* | Check for short writes in fdpass(). Clean up while at it. | tobias | 2015-03-26 | 1 | -4/+3 | |
| | | | | ok djm | |||||
* | Sync camel case of "ProxyUseFdpass" with ssh_config(5). | tobias | 2015-03-26 | 1 | -3/+3 | |
| | | | | ok djm | |||||
* | Support for nc -T on IPv6 addresses. | jca | 2015-02-14 | 1 | -7/+16 | |
| | | | | ok sthen@ | |||||
* | my mistake. we already did increase buffers to 16k; increasing to 64k | tedu | 2014-10-30 | 1 | -2/+2 | |
| | | | | would be the next stage of embiggening. restore 16k. | |||||
* | rework the poll loop to poll in both directions so it doesn't get stuck | tedu | 2014-10-30 | 1 | -47/+211 | |
| | | | | | if one pipe stalls out. from a diff by Arne Becker. (buffer size left alone for now) | |||||
* | POLLIN is not guaranteed to be set in revents for EOF so check for | millert | 2014-10-26 | 1 | -3/+3 | |
| | | | | POLLHUP too. OK deraadt@ | |||||
* | Remove unnecessary include: netinet/in_systm.h is not needed by these | lteo | 2014-10-24 | 1 | -2/+1 | |
| | | | | | | programs. ok deraadt@ millert@ | |||||
* | Make sure the correct errno is reported by warn* or err* and not | guenther | 2014-07-20 | 1 | -2/+3 | |
| | | | | | | the errno of an intervening cleanup operation like close/unlink/etc. Diff from Doug Hogan (doug (at) acyclic.org) | |||||
* | stick with 16k buffers for a little while to avoid bufferbloat. | tedu | 2014-06-10 | 1 | -2/+2 | |
| | | | | | atomicio writing out 64k in one direction will cause traffic in the other direction to stall until it's complete. discussion with deraadt | |||||
* | increase buffer size to 64k, and actually use it. ok deraadt | tedu | 2014-06-10 | 1 | -3/+3 | |
| | | | | from John-Mark Gurney | |||||
* | Use errc/warnc to simplify code. | guenther | 2014-05-20 | 1 | -2/+2 | |
| | | | | | | Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@ | |||||
* | Unbreak nc -6 -l. Don't retrieve and thus later set the routing table | jca | 2014-03-12 | 1 | -3/+2 | |
| | | | | | unless -V is passed (intent of the previous commit), and use SOL_SOCKET instead of IPPROTO_IP to set the rtable in local_listen(). ok sthen@ | |||||
* | Once more, the default routing table id is inherited from the process | claudio | 2014-02-26 | 1 | -3/+2 | |
| | | | | like for any other process as well. OK by many | |||||
* | one of the examples needs -N to work again; | jmc | 2014-02-10 | 1 | -3/+3 | |
| | | | | | | | the paper trail appears to be: reported in feebsd pr docs/185353 by rol robert-eckardt de fix suggested by peter wemm diff submitted to tech by allan jude | |||||
* | Only use setsockopt(..SO_RTABLE..) if the -V flag is given to nc/telnet, | sthen | 2013-10-26 | 1 | -7/+7 | |
| | | | | | same style as traceroute6 (change to int and use -1 as a flag, so rtable 0 can still be used as an explicit parameter). | |||||
* | Oups, a little bit overzealous. If we "route -T4 exec telnet foo", then | phessler | 2013-10-21 | 1 | -1/+2 | |
| | | | | make sure telnet runs in rdomain 4 as expected. Same for nc. | |||||
* | Set the requested rdomain on the socket instead of only on the IPv4 part. | phessler | 2013-10-21 | 1 | -11/+7 | |
| | | | | Also, switching to rdomain zero is a legit option so we should allow that. | |||||
* | escape not-full-stop-dot at eol; | jmc | 2013-08-20 | 1 | -2/+2 | |
| | ||||||
* | add -F to usage() and help(); | jmc | 2013-08-20 | 1 | -2/+3 | |
| | | | | ok djm | |||||
* | add -F flag to enabled fd-pass mode: establish connection and pass | djm | 2013-08-20 | 2 | -6/+89 | |
| | | | | | | connected socket to stdout. This is useful in proxy mode to establish a connection for use by ssh in conjunction with its new ProxyUseFDPass option; ok markus@ | |||||
* | use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@ | schwarze | 2013-07-16 | 1 | -4/+4 | |
| | ||||||
* | use FD_CLOEXEC instead of 1; from David Hill | okan | 2013-04-29 | 1 | -2/+2 | |
| | | | | ok otto | |||||
* | Don't shutdown nc(1)'s network socket when stdin closes. Matches *Hobbit*'s | sthen | 2013-03-20 | 2 | -7/+17 | |
| | | | | | | original netcat and GNU netcat; revert to old behaviour with the new -N flag if needed. After much discussion with otto deraadt tedu and Martin Pelikan. ok deraadt@ | |||||
* | All accept() errors are considered fatal, until someone gives a different | deraadt | 2013-03-12 | 1 | -4/+5 | |
| | | | | reason. No code changed, just documenting it... | |||||
* | remove some unnecessary sys/param.h inclusions | deraadt | 2012-12-04 | 1 | -3/+1 | |
| | ||||||
* | Allow UDP server to receive datagrams from multiple socket pairs with -k | haesbaert | 2012-07-07 | 2 | -7/+17 | |
| | | | | | | | flag. Prompted by a question from dsp at 2f30 dot org, diff from Lazarom Koromil with a few tweaks by me, many thanks. ok mikeb@ nicm@ haesbaert@ |