fwd
3 years agoRelease 1.3.9. master 1.3.9
Mark Wooding [Tue, 12 Jun 2018 10:25:45 +0000 (11:25 +0100)]
Release 1.3.9.

3 years agoconfigure.ac: Hack around Termux syslog weirdness.
Mark Wooding [Tue, 12 Jun 2018 10:21:17 +0000 (11:21 +0100)]
configure.ac: Hack around Termux syslog weirdness.

Termux's <syslog.h> has weird macros to redirect to Android's logcat
machinery, but these need a separate library to be linked in.  Notice
this weirdness and cope.

3 years agoconfigure.ac: Check `libm.a' for `modf'.
Mark Wooding [Tue, 12 Jun 2018 10:10:22 +0000 (11:10 +0100)]
configure.ac: Check `libm.a' for `modf'.

3 years agoRelease 1.3.8. 1.3.8
Mark Wooding [Sat, 9 Jun 2018 16:38:05 +0000 (17:38 +0100)]
Release 1.3.8.

3 years agofwd: Improve `source' and `target' lifecycle management.
Mark Wooding [Sat, 9 Jun 2018 16:28:14 +0000 (17:28 +0100)]
fwd: Improve `source' and `target' lifecycle management.

  * Add reference counts and functions for handling them to `source' and
    `target'.

  * Use these instead of poking the `destroy' methods directly.

  * Introduce a new `source' method, `shutdown', to disentangle the
    source from the machinery, and use this in `source_killall'.

This fixes a bug in socket sources with a connection limit: if an
endpoint closes during graceful shutdown, then the endpoint tries to
get the dead source to resume listening, and things go south quickly.

3 years agochan.c (chan_open): Actually initialize the error indicator.
Mark Wooding [Sat, 9 Jun 2018 16:02:50 +0000 (17:02 +0100)]
chan.c (chan_open): Actually initialize the error indicator.

Thank you, valgrind, for spotting this.

3 years agoRelease 1.3.7. 1.3.7
Mark Wooding [Mon, 4 Jun 2018 03:14:17 +0000 (04:14 +0100)]
Release 1.3.7.

3 years agoconfigure.ac, inet.c, un.c: Portability fixes for 64-bit socketry.
Mark Wooding [Mon, 4 Jun 2018 03:35:29 +0000 (04:35 +0100)]
configure.ac, inet.c, un.c: Portability fixes for 64-bit socketry.

3 years agodebian/control: Add missing build-dependency on `pkg-config'.
Mark Wooding [Mon, 4 Jun 2018 03:15:30 +0000 (04:15 +0100)]
debian/control: Add missing build-dependency on `pkg-config'.

3 years agoidentify.c: Stash a copy of the caller's description string.
Mark Wooding [Sun, 3 Jun 2018 23:43:06 +0000 (00:43 +0100)]
identify.c: Stash a copy of the caller's description string.

If the caller is a one-shot source then the description could well have
gone by the time we end up printing a message.

3 years agoidentify.c: Include <sys/resource.h> for `setrlimit' and friends.
Mark Wooding [Sun, 3 Jun 2018 23:42:37 +0000 (00:42 +0100)]
identify.c: Include <sys/resource.h> for `setrlimit' and friends.

POSIX says this is where to find them.

4 years agodebian/source/format: Apparently you have to have one of these now.
Mark Wooding [Fri, 7 Jul 2017 20:20:26 +0000 (21:20 +0100)]
debian/source/format: Apparently you have to have one of these now.

5 years agofwd.[ch]: Expose the program status flags globally.
Mark Wooding [Fri, 5 Feb 2016 01:16:04 +0000 (01:16 +0000)]
fwd.[ch]: Expose the program status flags globally.

5 years agofwd.c (fw_log): Report the timezone in log messages.
Mark Wooding [Fri, 5 Feb 2016 01:07:59 +0000 (01:07 +0000)]
fwd.c (fw_log): Report the timezone in log messages.

5 years agoWhitespace fixing.
Mark Wooding [Fri, 5 Feb 2016 01:07:34 +0000 (01:07 +0000)]
Whitespace fixing.

5 years agoGive the magic `current time' constant used by `fw_log' a sensible name.
Mark Wooding [Fri, 5 Feb 2016 01:07:18 +0000 (01:07 +0000)]
Give the magic `current time' constant used by `fw_log' a sensible name.

8 years agodebian: Abandon ancient `fw' package; replace CDBS with Debhelper.
Mark Wooding [Sat, 29 Jun 2013 14:00:04 +0000 (15:00 +0100)]
debian: Abandon ancient `fw' package; replace CDBS with Debhelper.

8 years agoUse new `mLib' function annotations.
Mark Wooding [Sat, 29 Jun 2013 13:58:49 +0000 (14:58 +0100)]
Use new `mLib' function annotations.

8 years agofwd.c: Check return code from `chdir'.
Mark Wooding [Sat, 29 Jun 2013 14:03:14 +0000 (15:03 +0100)]
fwd.c: Check return code from `chdir'.

I don't think I care much about this one, but handling it properly is
prettier than slapping `DISCARD' on it.

8 years agoexec.c: Fix a format string stupidity.
Mark Wooding [Sat, 29 Jun 2013 13:57:39 +0000 (14:57 +0100)]
exec.c: Fix a format string stupidity.

8 years agoEliminate the `rlimits.h' header using scary macros.
Mark Wooding [Sat, 29 Jun 2013 13:56:57 +0000 (14:56 +0100)]
Eliminate the `rlimits.h' header using scary macros.

The `rlimits.h' header is a bit of a hack, which was thought necessary
because if must assemble a list of things conditionally.  This patch
eliminates this unpleasantness by replacing it with a different hack
which is at least as nasty.

Associate with each potential limit name a macro whose value is either
`t' or `nil', indicating whether the limit is known.  This can be done
using lots of `#ifdef ... #else ... #endif' blocks.  Finally, assemble
a list macro of all of the names, whether they're known or not (because
we can't tell at this point).  The trick is that, instead of just calling
`_(...)' for each item, we call `MAYBE_CALL(_, HAVE_???_P, (...))', and
the latter uses token-pasting to dispatch on the `HAVE_???_P' flag and
conditionally invoke `_(...)'.  Thus callers can work with this as a
conventional list macro.

Of course, building all of this is monumentally tedious, so we get Emacs
to do it for us.

8 years agoconf.h, scan.h: Remove dead header files.
Mark Wooding [Sat, 29 Jun 2013 13:49:41 +0000 (14:49 +0100)]
conf.h, scan.h: Remove dead header files.

9 years agoRelease 1.3.6. 1.3.6
Mark Wooding [Thu, 8 Dec 2011 16:06:49 +0000 (16:06 +0000)]
Release 1.3.6.

10 years agofwd.c: Actually accept the -q option.
Mark Wooding [Sat, 11 Jun 2011 16:07:19 +0000 (17:07 +0100)]
fwd.c: Actually accept the -q option.

For some reason, this got left out of the short option list.

10 years agoBuild system: Add support for Automake's `silent-rules' feature.
Mark Wooding [Fri, 13 May 2011 19:29:53 +0000 (20:29 +0100)]
Build system: Add support for Automake's `silent-rules' feature.

10 years ago.gitignore: Autoconf machinery banished to the `config' directory.
Mark Wooding [Fri, 13 May 2011 19:29:31 +0000 (20:29 +0100)]
.gitignore: Autoconf machinery banished to the `config' directory.

Remove the individual files from the list, and add `config'.

10 years agoconf.c (conf_fname): Don't make `,' a filename character.
Mark Wooding [Fri, 13 May 2011 19:28:12 +0000 (20:28 +0100)]
conf.c (conf_fname): Don't make `,' a filename character.

This wasn't documented anyway, and it conflicts with the use of `,' as a
filename separator in the file endpoint definition syntax.

10 years agofile.c (file_read): Copy name when duplicating input file spec.
Mark Wooding [Fri, 13 May 2011 19:26:13 +0000 (20:26 +0100)]
file.c (file_read): Copy name when duplicating input file spec.

If only one filespec is provided to the file endpoint, then it copies
the input spec (which it's already parsed) to the output.  But this
isn't enough because the spec might contain a dynamically allocated
filename.  The function `file_destroy' unconditionally frees both names,
which is a double-free bug.

Fix this in the stupid way, by allocating a separate copy of the
filename if we duplicate the input filespec.  (I could fix it in
`file_destroy' instead, but that becomes a little fiddly, and it's
rather brittle.

11 years agoVarious: Report errors encountered while doing channel I/O.
Mark Wooding [Mon, 10 May 2010 01:18:04 +0000 (02:18 +0100)]
Various: Report errors encountered while doing channel I/O.

I'm amazed I let these get swallowed up between chan and endpt.  Oh,
well.

Minor interface change: endpt_join wants a channel description string,
but the source (which always does the joining anyway) has one to hand.
The channel structure has grown an error indicator which the endpoint
manager inspects when it's tearing down the connection.

11 years ago.links: Add config/auto-version.
Mark Wooding [Mon, 10 May 2010 01:23:59 +0000 (02:23 +0100)]
.links: Add config/auto-version.

Oops.

12 years agoUse new mdup(3mLib) function.
Mark Wooding [Sun, 4 Jan 2009 18:05:10 +0000 (18:05 +0000)]
Use new mdup(3mLib) function.

It makes descriptor juggling much more reliable.  Increase version
requirement on mLib to 2.1.0.

13 years agoMake the filename syntax more palatable. 1.3.5interim
Mark Wooding [Tue, 8 Apr 2008 10:57:13 +0000 (11:57 +0100)]
Make the filename syntax more palatable.

Quotes are needed for talking about too many interesting files.  In
particular, it's nice to be able to refer to, say, /tmp/.X11-unix/X0
from the command-line without quotes.

This change introduces a new function conf_fname which extends the word
characters appropriately during a read, and makes the various clients --
file, un, and exec -- actually use it rather than calling conf_name
directly.

13 years agoMerge branch 'fwd' 1.3.5
Mark Wooding [Wed, 2 Apr 2008 09:02:05 +0000 (10:02 +0100)]
Merge branch 'fwd'

* fwd:
  Rename entire project from `fw' to `fwd'.

13 years agoRename entire project from `fw' to `fwd'.
Mark Wooding [Wed, 2 Apr 2008 08:46:46 +0000 (09:46 +0100)]
Rename entire project from `fw' to `fwd'.

I'm fed up of the name clash with funnelweb.  It ends here, and now.

Most of the work is with the Debian package, to provide a compatibility
package which does the right thing.

13 years agosocket: New option accept-count.
Mark Wooding [Wed, 2 Apr 2008 08:12:02 +0000 (09:12 +0100)]
socket: New option accept-count.

Simply: how many times we call accept in the loop.  This doesn't have as
much affect as I'd hoped, but maybe there's some big performance sink
somewhere.

Suggested by Robin Bryce (thanks).

13 years agoblast: Fix segfault for immediate connection.
Mark Wooding [Wed, 2 Apr 2008 08:10:53 +0000 (09:10 +0100)]
blast: Fix segfault for immediate connection.

This manifests itself when run under noip, which uses Unix-domain sockets
instead.  The problem is to do with the timer, which isn't active at the
the that conn_init is called.

13 years agobuild: Actually compile the `blast' helper program.
Mark Wooding [Wed, 2 Apr 2008 08:08:23 +0000 (09:08 +0100)]
build: Actually compile the `blast' helper program.

It's not pretty or documented but it does more-or-less work.

13 years agoMark this version as 1.3.0. 1.3.0
Mark Wooding [Tue, 1 Apr 2008 19:18:47 +0000 (20:18 +0100)]
Mark this version as 1.3.0.

13 years agodebian: Provide an init script to run the daemon on boot.
Mark Wooding [Tue, 1 Apr 2008 19:12:19 +0000 (20:12 +0100)]
debian: Provide an init script to run the daemon on boot.

Also create a user.

13 years agoConsolidate all the external definitions into a single header.
Mark Wooding [Tue, 1 Apr 2008 19:12:19 +0000 (20:12 +0100)]
Consolidate all the external definitions into a single header.

This isn't a large project and isn't likely to become one.  This keeps
down the number of itty little files we need to keep track of.

13 years agobuild: Rewrite the build system to be nicer.
Mark Wooding [Tue, 1 Apr 2008 20:00:17 +0000 (21:00 +0100)]
build: Rewrite the build system to be nicer.

13 years agoFix whitespace throughout.
Mark Wooding [Tue, 1 Apr 2008 18:06:28 +0000 (19:06 +0100)]
Fix whitespace throughout.

13 years agoRemove crufty CVS $Id$ tags.
Mark Wooding [Tue, 1 Apr 2008 12:03:32 +0000 (13:03 +0100)]
Remove crufty CVS $Id$ tags.

13 years agoDrop privileges after writing the pidfile.
Mark Wooding [Tue, 1 Apr 2008 12:47:40 +0000 (13:47 +0100)]
Drop privileges after writing the pidfile.

Otherwise we may not be able to write it (e.g., to /var/run) because
of file access restrictions.

14 years agosocket: Get address option defaults correctly.
Mark Wooding [Mon, 25 Jun 2007 22:18:18 +0000 (23:18 +0100)]
socket: Get address option defaults correctly.

Ooops: we'd overwrite the address-family-specific defaults with the
generic ones.

15 years agodocs: Generate grammar and option summaries from manpage.
Mark Wooding [Wed, 22 Feb 2006 02:07:00 +0000 (02:07 +0000)]
docs: Generate grammar and option summaries from manpage.

I've been dreaming about this for ages and finally obtained a tuit from
somewhere.  The (rather grungy) script make-manpage extracts the grammar
and option information from the input manpage and spits it out again.

It's slightly surprising how bad a deroffer it can get away with...

15 years agomanpage: Fix email address.
Mark Wooding [Wed, 22 Feb 2006 00:04:23 +0000 (00:04 +0000)]
manpage: Fix email address.

15 years agoinfra: Clean up project setup
Mark Wooding [Wed, 8 Feb 2006 18:47:55 +0000 (18:47 +0000)]
infra: Clean up project setup

15 years agoblast: Upper-case metasyntactic variables in the usage message.
Mark Wooding [Mon, 6 Feb 2006 17:56:36 +0000 (17:56 +0000)]
blast: Upper-case metasyntactic variables in the usage message.

15 years agoExtract Subversion ignore data.
Mark Wooding [Mon, 6 Feb 2006 17:55:43 +0000 (17:55 +0000)]
Extract Subversion ignore data.

15 years agoFix email address.
mdw [Tue, 18 Oct 2005 16:12:45 +0000 (16:12 +0000)]
Fix email address.

15 years agoFix stupidity.
mdw [Tue, 18 Oct 2005 16:12:35 +0000 (16:12 +0000)]
Fix stupidity.

15 years agoArrgh. Another cock-up.
mdw [Thu, 5 May 2005 23:07:03 +0000 (23:07 +0000)]
Arrgh. Another cock-up.

15 years agoFix the manpage too.
mdw [Thu, 5 May 2005 23:03:47 +0000 (23:03 +0000)]
Fix the manpage too.

15 years agoFix up the help message.
mdw [Thu, 5 May 2005 23:02:28 +0000 (23:02 +0000)]
Fix up the help message.

15 years agoProvide a `--pidfile' option in `fw'.
mdw [Thu, 5 May 2005 22:57:16 +0000 (22:57 +0000)]
Provide a `--pidfile' option in `fw'.

15 years agoAutoconf and automake fixing.
mdw [Fri, 22 Apr 2005 21:55:58 +0000 (21:55 +0000)]
Autoconf and automake fixing.

15 years agoExpunge CVS cruft.
mdw [Sun, 12 Sep 2004 10:36:02 +0000 (10:36 +0000)]
Expunge CVS cruft.

17 years agoExpunge revision histories in files.
mdw [Thu, 8 Apr 2004 01:36:25 +0000 (01:36 +0000)]
Expunge revision histories in files.

18 years agoFix source option prefix.
mdw [Sun, 30 Nov 2003 00:25:27 +0000 (00:25 +0000)]
Fix source option prefix.

18 years agoLittle formatting fixes.
mdw [Sat, 29 Nov 2003 23:03:19 +0000 (23:03 +0000)]
Little formatting fixes.

18 years agoAnd a typo fix.
mdw [Sat, 29 Nov 2003 22:15:19 +0000 (22:15 +0000)]
And a typo fix.

18 years agoFix bug in identification timout handling.
mdw [Sat, 29 Nov 2003 22:13:43 +0000 (22:13 +0000)]
Fix bug in identification timout handling.

18 years agoRequire mLib 2.0.3 for connection stuff.
mdw [Sat, 29 Nov 2003 20:45:41 +0000 (20:45 +0000)]
Require mLib 2.0.3 for connection stuff.

18 years agoDon't do priv separation if no priv connections to make.
mdw [Sat, 29 Nov 2003 20:43:01 +0000 (20:43 +0000)]
Don't do priv separation if no priv connections to make.

18 years agoPrivileged outgoing connections.
mdw [Sat, 29 Nov 2003 20:36:07 +0000 (20:36 +0000)]
Privileged outgoing connections.

18 years agoUpdate docco for new options.
mdw [Tue, 25 Nov 2003 14:46:50 +0000 (14:46 +0000)]
Update docco for new options.

18 years agoPreliminary bump to 1.2.7.
mdw [Tue, 25 Nov 2003 14:11:18 +0000 (14:11 +0000)]
Preliminary bump to 1.2.7.

18 years agoDebianization. Socket target options. Internet binding.
mdw [Tue, 25 Nov 2003 14:08:23 +0000 (14:08 +0000)]
Debianization.  Socket target options.  Internet binding.

18 years agoFix data corruption in channel\!
mdw [Fri, 31 Oct 2003 13:56:14 +0000 (13:56 +0000)]
Fix data corruption in channel\!

18 years agoVersion bump. 1.2.6
mdw [Sat, 17 May 2003 12:33:55 +0000 (12:33 +0000)]
Version bump.

18 years agoFix bogus examples. Explain quoting rules for `exec' endpoints.
mdw [Fri, 24 Jan 2003 20:13:04 +0000 (20:13 +0000)]
Fix bogus examples.  Explain quoting rules for `exec' endpoints.

18 years agoCorrectly cast uid and gid sentinel values.
mdw [Fri, 24 Jan 2003 20:12:40 +0000 (20:12 +0000)]
Correctly cast uid and gid sentinel values.

18 years agoCorrectly cast uid and gid sentinel values. Parse full filenames in
mdw [Fri, 24 Jan 2003 20:12:26 +0000 (20:12 +0000)]
Correctly cast uid and gid sentinel values.  Parse full filenames in
exec arguments (can't do it for program, unfortunately, since the die is
cast).

18 years agoDon't do resource limits on Cygwin.
mdw [Fri, 24 Jan 2003 20:11:14 +0000 (20:11 +0000)]
Don't do resource limits on Cygwin.

19 years agoFix stupid bugs from the listen(2) change.
mdw [Sat, 23 Feb 2002 00:08:00 +0000 (00:08 +0000)]
Fix stupid bugs from the listen(2) change.

19 years agoFix spacing around full stops (at last!).
mdw [Sat, 23 Feb 2002 00:05:12 +0000 (00:05 +0000)]
Fix spacing around full stops (at last!).

19 years agoAdd option to change the listen(2) parameter. Receive `fw'-specific
mdw [Fri, 22 Feb 2002 23:45:20 +0000 (23:45 +0000)]
Add option to change the listen(2) parameter.  Receive `fw'-specific
code from `conf.c'.

19 years agoAdd option to change the listen(2) parameter.
mdw [Fri, 22 Feb 2002 23:45:01 +0000 (23:45 +0000)]
Add option to change the listen(2) parameter.

19 years agoCall @xfree@ rather than @free@. Add option to change the listen(2)
mdw [Fri, 22 Feb 2002 23:44:44 +0000 (23:44 +0000)]
Call @xfree@ rather than @free@.  Add option to change the listen(2)
parameter.

19 years agoMiscellaneous tidying up, to make this code independent of `fw'. It
mdw [Fri, 22 Feb 2002 23:44:16 +0000 (23:44 +0000)]
Miscellaneous tidying up, to make this code independent of `fw'.  It
might end up in a library somewhere.

19 years agoCall @xfree@ rather than @free@.
mdw [Fri, 22 Feb 2002 23:43:32 +0000 (23:43 +0000)]
Call @xfree@ rather than @free@.

19 years ago`fw'-specific configuration code moved out. This file might become part
mdw [Fri, 22 Feb 2002 23:42:56 +0000 (23:42 +0000)]
`fw'-specific configuration code moved out.  This file might become part
of a library some day.

19 years agoInitialize scanner properly.
mdw [Wed, 30 Jan 2002 09:29:34 +0000 (09:29 +0000)]
Initialize scanner properly.

19 years agoDelimiter-setting function names change.
mdw [Sun, 13 Jan 2002 14:50:22 +0000 (14:50 +0000)]
Delimiter-setting function names change.

19 years agoMake delimiters be a property of a scanner.
mdw [Sun, 13 Jan 2002 14:50:07 +0000 (14:50 +0000)]
Make delimiters be a property of a scanner.

19 years agoConditional compilation for @getnetbyname@, since Cygwin doesn't have
mdw [Sun, 13 Jan 2002 14:49:56 +0000 (14:49 +0000)]
Conditional compilation for @getnetbyname@, since Cygwin doesn't have
it.

19 years agoTrack @dstr_vputf@ change.
mdw [Sun, 13 Jan 2002 14:49:17 +0000 (14:49 +0000)]
Track @dstr_vputf@ change.

19 years agoTrack @lbuf@ changes in mLib.
mdw [Sun, 13 Jan 2002 14:49:03 +0000 (14:49 +0000)]
Track @lbuf@ changes in mLib.

19 years agoCheck for @getnetbyname@, since it appears not to be available under
mdw [Sun, 13 Jan 2002 14:48:39 +0000 (14:48 +0000)]
Check for @getnetbyname@, since it appears not to be available under
Cygwin.

19 years agoMake delimiters be a property of a scanner. Change the delimiter-
mdw [Sun, 13 Jan 2002 14:48:16 +0000 (14:48 +0000)]
Make delimiters be a property of a scanner.  Change the delimiter-
changing functions' names.

20 years agoNew @conn_init@ interface.
mdw [Fri, 22 Jun 2001 19:37:00 +0000 (19:37 +0000)]
New @conn_init@ interface.

20 years agoEnlarge the identity buffer.
mdw [Fri, 22 Jun 2001 19:36:49 +0000 (19:36 +0000)]
Enlarge the identity buffer.

20 years agoUpdate manual style. 1.2.5
mdw [Fri, 23 Feb 2001 09:11:29 +0000 (09:11 +0000)]
Update manual style.

20 years agoMinor fixings to wording.
mdw [Mon, 5 Feb 2001 19:47:11 +0000 (19:47 +0000)]
Minor fixings to wording.

20 years agoFix flags to be unsigned.
mdw [Sat, 3 Feb 2001 20:33:26 +0000 (20:33 +0000)]
Fix flags to be unsigned.

20 years agoVersion bump.
mdw [Sat, 3 Feb 2001 20:30:15 +0000 (20:30 +0000)]
Version bump.

20 years agoSupport re-reading config files on SIGHUP.
mdw [Sat, 3 Feb 2001 20:30:03 +0000 (20:30 +0000)]
Support re-reading config files on SIGHUP.

20 years agoHandle select errors more robustly.
mdw [Sat, 20 Jan 2001 11:55:17 +0000 (11:55 +0000)]
Handle select errors more robustly.

21 years agoVaguely useful tool for measuring the rate at which a server accepts
mdw [Tue, 1 Aug 2000 18:00:52 +0000 (18:00 +0000)]
Vaguely useful tool for measuring the rate at which a server accepts
connections.