summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ftp-proxy/ftp-proxy.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rate-limit accepting of new connections while we are experiencingcamield2012-04-051-6/+25
| | | | | | fd exhaustion. ok deraadt mikeb
* In preparation for getline and getdelim additions to libc, rename getline()fgsch2012-03-041-5/+5
| | | | | occurrences to get_line(). Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
* Convert SO_RTABLE's protocol level to the SOL_SOCKET; ok claudiomikeb2011-06-211-4/+3
|
* switch ftp-proxy over to divert-to instead of rdr-to. this avoidsmikeb2011-04-281-7/+9
| | | | | an expensive state lookup (via natlook ioctl) and shrinks the code. tested by me and sthen, ok reyk sthen
* Use the rdomain information returned by DIOCNATLOOK to install theclaudio2011-03-251-13/+16
| | | | | | nat-to and rdr-to rules with correct rtable rule attributes. This allows to use ftp-proxy to proxy accross rdomains. Tested and OK phessler@, OK henning@
* Bring ftp-proxy in sync with the massive pf change just commited by Henning.claudio2009-09-011-28/+8
| | | | | | | | | | | | | This changes the way the rdr/nat rules are added to pf. Now only a single anchor is needed (the other ones do no longer exist). To convert your ruleset you need something like this at the start of your ruleset: # filter rules and anchors for ftp-proxy(8) anchor "ftp-proxy/*" pass in quick proto tcp to port ftp rdr-to 127.0.0.1 port 8021 This was tested by myself, sthen@, dlg@ and I think many more. OK by the same people plus henning.
* Better error messages. Include the function causing the problem and do notclaudio2008-06-131-7/+4
| | | | | include the program name in logmsg() plus exit_daemon() does not return so make it a void function. OK mpf@
* Flush output buffers before closing TCP session. Fixes the case wherejoel2008-04-221-1/+7
| | | | | | | | | | the proxy would eat the 221 response coming from the server towards the client. Patch from camield@. Tested by Camiel and myself. ok camield@
* Use arc4random_buf() when requesting more than a single word of outputdjm2008-04-131-3/+3
| | | | | | | Use arc4random_uniform() when the desired random number upper bound is not a power of two ok deraadt@ millert@
* Don't pass quick when tagging, so the tag can be used outsidehenning2008-02-261-2/+3
| | | | | | the ftp-proxy anchor. Exotic setups with route-to etc. can be implemented this way. from camield, ok reyk beck canacar and manpage polished by jmc
* Some servers / proxies out there like to open the data connectioncamield2007-08-151-11/+34
| | | | | | | | | | | | immediately after the client sends the PORT command. The "normal" behaviour is to wait for the client to actually request a transfer. Make ftp-proxy add the active mode rules immediately too, so that both scenario's work. ok david pyr Tested by Frank Denis, Stephan A. Rickauer, Ingo Schwarze, Stuart Henderson. Thanks.
* allow ftp-proxy to add tag statements to teh rules it insertshenning2007-08-011-5/+11
| | | | clever, nice and easy diff from bsd@openbsd.rutgers.edu, ok pyr reyk
* Remove stub write callback functions now that libevent allows them to be NULL.camield2006-12-301-19/+5
|
* Convert three instances of atoi() to strtonum() and apply sane upper bounds.camield2006-12-301-10/+12
| | | | | | Triggered by Rik/harry Bobbaers on bugs@. ok mbalmer@ ray@
* Ignore sigpipe as libevent does not handle that for us. Confirmed bycamield2006-12-121-1/+2
| | | | | | | | | provos. Fixes race condition where ftp-proxy would silently exit if a write was attempted on a socket that was closed by an RST. Should fix PR 5260. ok claudio@
* Close file descriptors before cleaning up the events, might cause a racecamield2006-10-151-6/+6
| | | | otherwise.
* unused variablecamield2006-03-251-3/+3
| | | | from Andrey Matveev
* Rework signal handling the idiomatic libevent way. From ospfd.camield2006-03-221-20/+25
| | | | ok claudio henning
* don't assume that close() can fail, from deraadtcamield2005-11-181-5/+3
| | | | ok henning deraadt
* buffer overflowderaadt2005-11-171-2/+3
|
* add OpenBSD cvs tags, prompted by xsa@camield2005-06-071-0/+2
|
* Introduce verbose option to control the logging of the pf rules.camield2005-06-071-4/+10
| | | | ok beck mpf
* Don't call va_start() when we do not log. From Andrey Matveev.camield2005-05-301-1/+2
|
* do not allow nul in the control connection.camield2005-05-271-4/+10
| | | | ok beck
* Import new FTP proxy. Handles IPv6 and all FTP modes. It wascamield2005-05-261-0/+1085
previously known as pftpx. Not connected to the builds yet. ok beck