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

8 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.

10 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.

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

10 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.

10 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.

10 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.

10 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.

12 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.

12 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.

12 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.

12 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'.

12 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.

12 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.

13 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.

13 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.

15 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.

16 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.

16 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'.

16 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.

16 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).

16 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.

16 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.

16 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.

16 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.

16 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.

16 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.

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

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

16 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.

16 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.

18 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...

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

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

18 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.

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

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

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

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

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

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

18 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'.

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

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

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

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

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

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

20 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.

20 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.

20 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.

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

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

20 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.

20 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.

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

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

21 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.

21 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.

21 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).

21 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.

22 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.

22 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!).

22 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'.

22 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.

22 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.

22 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.

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

22 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.

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

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

22 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.

22 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.

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

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

22 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.

22 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.

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

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

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

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

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

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

23 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.

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

23 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.

23 years agoSwitch over to using `size_t' for socket address lengths.
mdw [Tue, 1 Aug 2000 17:59:56 +0000 (17:59 +0000)]
Switch over to using `size_t' for socket address lengths.

23 years agoRemove unnecessary <ctype.h> header.
mdw [Tue, 1 Aug 2000 17:58:32 +0000 (17:58 +0000)]
Remove unnecessary <ctype.h> header.

23 years agoInclude missing <mLib/alloc.h> header.
mdw [Tue, 1 Aug 2000 17:58:25 +0000 (17:58 +0000)]
Include missing <mLib/alloc.h> header.

23 years agoFix subtleties with <ctype.h> functions.
mdw [Tue, 1 Aug 2000 17:58:10 +0000 (17:58 +0000)]
Fix subtleties with <ctype.h> functions.

23 years ago(writechan): Pointless tweak: when the buffer is empty, reset the start
mdw [Wed, 19 Jul 2000 17:55:43 +0000 (17:55 +0000)]
(writechan): Pointless tweak: when the buffer is empty, reset the start
pointer to the beginning.  This saves doing slightly trickier
@writev(2)@ calls when loading is light.

23 years agoUse new mLib selbuf features.
mdw [Sat, 1 Jul 2000 11:28:52 +0000 (11:28 +0000)]
Use new mLib selbuf features.

24 years agoRequire later mLib for sel.c bugfixes.
mdw [Thu, 23 Mar 2000 23:26:29 +0000 (23:26 +0000)]
Require later mLib for sel.c bugfixes.

24 years agoRemove listener even if connection option isn't SOCKOPT_LIMITED. 1.2.4
mdw [Thu, 23 Mar 2000 23:20:42 +0000 (23:20 +0000)]
Remove listener even if connection option isn't SOCKOPT_LIMITED.

24 years agoVersion bump.
mdw [Thu, 23 Mar 2000 23:19:42 +0000 (23:19 +0000)]
Version bump.

24 years agoFix changed options in parser table.
mdw [Thu, 23 Mar 2000 23:19:19 +0000 (23:19 +0000)]
Fix changed options in parser table.

24 years agoAdd option to change user and group after initialization. Naughtily 1.2.3
mdw [Thu, 23 Mar 2000 00:37:33 +0000 (00:37 +0000)]
Add option to change user and group after initialization.  Naughtily
reassign short equivalents of --grammar and --options.

24 years agoVersion bump.
mdw [Thu, 23 Mar 2000 00:35:50 +0000 (00:35 +0000)]
Version bump.

24 years agoTerminate tables of sources and targets.
mdw [Sat, 12 Feb 2000 18:13:20 +0000 (18:13 +0000)]
Terminate tables of sources and targets.

24 years agoFix some errors, and document new option. 1.2.2
mdw [Wed, 22 Dec 1999 15:44:43 +0000 (15:44 +0000)]
Fix some errors, and document new option.