chiark / gitweb /
7 months agoRelease 1.2.3. master 1.2.3
Mark Wooding [Wed, 4 Jul 2018 17:59:25 +0000 (18:59 +0100)]
Release 1.2.3.

7 months agonoip.c (do_implicit_bind): Handle `SAME' impbind entries properly.
Mark Wooding [Wed, 4 Jul 2018 17:40:30 +0000 (18:40 +0100)]
noip.c (do_implicit_bind): Handle `SAME' impbind entries properly.

For some reason this just got left out.

7 months agonoip.c (do_implicit_bind): Set wildcard port if we find a match.
Mark Wooding [Wed, 4 Jul 2018 17:39:52 +0000 (18:39 +0100)]
noip.c (do_implicit_bind): Set wildcard port if we find a match.

Otherwise it's left uninitialized, and there is sadness.

8 months agonoip.c, uopen.c: Provide fallback implementation of `SUN_LEN'.
Mark Wooding [Tue, 12 Jun 2018 11:07:34 +0000 (12:07 +0100)]
noip.c, uopen.c: Provide fallback implementation of `SUN_LEN'.

Apparently Android's `libc' doesn't have this.

8 months agoRelease 1.2.2. 1.2.2
Mark Wooding [Sun, 10 Jun 2018 00:20:30 +0000 (01:20 +0100)]
Release 1.2.2.

8 months agonoip.c (getpeername): Don't swallow the return code.
Mark Wooding [Sun, 10 Jun 2018 00:07:19 +0000 (01:07 +0100)]
noip.c (getpeername): Don't swallow the return code.

How did this ever work?

8 months agoRelease 1.2.1. 1.2.1
Mark Wooding [Sat, 9 Jun 2018 15:00:11 +0000 (16:00 +0100)]
Release 1.2.1.

8 months agonoip.c: Support `SO_REUSEADDR', rather sketchily.
Mark Wooding [Sat, 9 Jun 2018 14:56:33 +0000 (15:56 +0100)]
noip.c: Support `SO_REUSEADDR', rather sketchily.

If the caller tries to bind, and has previously set the `SO_REUSEADDR'
flag, then unlink any existing socket unless there's an active listener

8 months agonoip.c (unix_socket_status): Return whether anyone's listening.
Mark Wooding [Sat, 9 Jun 2018 14:54:35 +0000 (15:54 +0100)]
noip.c (unix_socket_status): Return whether anyone's listening.

Add a new `LISTEN' flag which says whether anyone's listening on the
socket.  Maybe the listener has gone away and we can only see the
leftover connections.

8 months agonoip.c (encode_single_inet_addr): Make the logic less weird.
Mark Wooding [Sat, 9 Jun 2018 14:53:20 +0000 (15:53 +0100)]
noip.c (encode_single_inet_addr): Make the logic less weird.

Now it doesn't need to know quite so much about all of the possible
status values.

8 months agonoip.c (unix_socket_status): Refactor status-file parsing.
Mark Wooding [Sat, 9 Jun 2018 14:52:12 +0000 (15:52 +0100)]
noip.c (unix_socket_status): Refactor status-file parsing.

Remove the early exit: we always process all of the entries now.  The
socket is `STALE' if we can't find any entries.

8 months agonoip.c: Make the `unix_socket_status' return a bitfield.
Mark Wooding [Sat, 9 Jun 2018 14:51:07 +0000 (15:51 +0100)]
noip.c: Make the `unix_socket_status' return a bitfield.

The constant names are the same, but they're processed differently.

8 months agonoip.c (recvfrom, recvmsg): Don't swallow the underlying system error.
Mark Wooding [Sat, 9 Jun 2018 14:43:20 +0000 (15:43 +0100)]
noip.c (recvfrom, recvmsg): Don't swallow the underlying system error.

Move the call to `real_recvfoo' outside of `PRESERVING_ERRNO'.

8 months agoRelease 1.2.0. 1.2.0
Mark Wooding [Fri, 8 Jun 2018 10:24:08 +0000 (11:24 +0100)]
Release 1.2.0.

8 months agodebian/rules: Use old-fashioned `dpkg-buildflags' options.
Mark Wooding [Fri, 8 Jun 2018 10:36:22 +0000 (11:36 +0100)]
debian/rules: Use old-fashioned `dpkg-buildflags' options.

I'm still trying to build packages for `wheezy' sometimes.

8 months agodebian/control: `noip' only works on Linux.
Mark Wooding [Thu, 7 Jun 2018 10:00:33 +0000 (11:00 +0100)]
debian/control: `noip' only works on Linux.

Because it trawls through magic Linux `/proc/' files.  Patches welcome
for BSD support.

8 months agonoip.1: Clarify ACL list syntax.
Mark Wooding [Thu, 7 Jun 2018 09:59:31 +0000 (10:59 +0100)]
noip.1: Clarify ACL list syntax.

The ACLish keywords add lists rather than individual entries.  The
`impbind' keyword had no explanation of how entries were separated.  Fix
this garbled mess.

8 months agonoip.1: Associate connection-to-remote-host aside with `realconnect'.
Mark Wooding [Thu, 7 Jun 2018 09:57:21 +0000 (10:57 +0100)]
noip.1: Associate connection-to-remote-host aside with `realconnect'.

It seemed like a non-sequitur where it was, especially after the
`impbind' section was added.

8 months agonoip.1: Fix bungled description of comment syntax.
Mark Wooding [Thu, 7 Jun 2018 09:56:48 +0000 (10:56 +0100)]
noip.1: Fix bungled description of comment syntax.

8 months agobuild, debian/: Add a `configure' script to make things easier.
Mark Wooding [Wed, 6 Jun 2018 23:37:22 +0000 (00:37 +0100)]
build, debian/: Add a `configure' script to make things easier.

Amazingly, this is good enough to work with Debhelper, so throw out the
earlier fiddling.

8 months agoMakefile: Support out-of-tree builds.
Mark Wooding [Wed, 6 Jun 2018 21:09:32 +0000 (22:09 +0100)]
Makefile: Support out-of-tree builds.

The `distcheck' target shows how you can do this, though it's rather

8 months agoMakefile (distcheck): Propagate jobserver parameters to the test build.
Mark Wooding [Wed, 6 Jun 2018 21:01:21 +0000 (22:01 +0100)]
Makefile (distcheck): Propagate jobserver parameters to the test build.

8 months agoMakefile (distdir): Copy files rather than linking.
Mark Wooding [Wed, 6 Jun 2018 20:57:56 +0000 (21:57 +0100)]
Makefile (distdir): Copy files rather than linking.

Linking will hardlink symlinks, and that won't end well.  All our files
are tiny, so it's not worth worrying about the performance effect.

8 months agoMakefile: Sink the silent-rules machinery.
Mark Wooding [Wed, 6 Jun 2018 21:06:03 +0000 (22:06 +0100)]
Makefile: Sink the silent-rules machinery.

This is not really user-serviceable.

8 months agoMakefile: Refactor the silent-rules machinery.
Mark Wooding [Wed, 6 Jun 2018 20:56:27 +0000 (21:56 +0100)]
Makefile: Refactor the silent-rules machinery.

Now it's more like what I do elsewhere.

8 months agoMakefile: Generate and include dependency information for headers.
Mark Wooding [Wed, 6 Jun 2018 20:51:32 +0000 (21:51 +0100)]
Makefile: Generate and include dependency information for headers.

Not that there are any right now, but it's the principle of the thing.

8 months agoMakefile (all, clean): Make these be double-colon targets.
Mark Wooding [Wed, 6 Jun 2018 20:53:49 +0000 (21:53 +0100)]
Makefile (all, clean): Make these be double-colon targets.

8 months agoMakefile (clean): Have a variable for things to clean.
Mark Wooding [Wed, 6 Jun 2018 20:52:50 +0000 (21:52 +0100)]
Makefile (clean): Have a variable for things to clean.

8 months agoMakefile: Factor out common build arrangements for hacks.
Mark Wooding [Wed, 6 Jun 2018 20:48:53 +0000 (21:48 +0100)]
Makefile: Factor out common build arrangements for hacks.

  * Name the `..._SOURCES' variable literally after the hack, so that it
    can be recovered mechanically.

  * Accumulate all of the sources together, into an `ALL_SOURCES' and
    dump that into `DISTFILES', rather than marking them separately for

  * Replace the separate linker rules with a single static-pattern rule.
    This unfortunately needs `.SECONDEXPANSION' to work properly.

8 months agodebian/.gitignore: Ignore Debhelper's little droppings.
Mark Wooding [Wed, 6 Jun 2018 23:32:17 +0000 (00:32 +0100)]
debian/.gitignore: Ignore Debhelper's little droppings.

8 months ago.gitignore: Rearrange and make more sensible.
Mark Wooding [Wed, 6 Jun 2018 20:16:56 +0000 (21:16 +0100)]
.gitignore: Rearrange and make more sensible.

Things like `deb-build' are my local conventions, so leave them to my
common ignore file.  Ignore all `.so' files rather than just the ones we
know about.  Alas, we can't bulk-ignore the generated scripts, but at
least we can mark the rules for fixed files as being absolute pathnames.

Also add an entry for `/debian/debhelper-build-stamp', since that's
turned up.

8 months agonoip.c: Support IPv6-mapped IPv4 addresses (nearly) correctly.
Mark Wooding [Wed, 6 Jun 2018 19:34:26 +0000 (20:34 +0100)]
noip.c: Support IPv6-mapped IPv4 addresses (nearly) correctly.

There's a longstanding bug here.  If a program makes an `AF_INET6'
socket, and then tries to connect to a v6-mapped v4 address, then `noip'
/ought/ to match that against an existing binding of the corresponding
real IPv4 address, and /vice versa/.

Also, to support non-`IPV6_V6ONLY' server sockets, when trying to
resolve an IPv4 connection, consider the IPv6 wildcard address as a
suitable match.

There's unfortunately quite a lot here, but it all really needs to be
done in one go to work properly.

  * Add `map_ipv4_sockaddr' and `unmap_ipv4_sockaddr' functions to
    do the grunt-work of the address handling.

  * In `encode_unused_inet_addr', check that a proposed v4 socket
    address doesn't conflict with any v6-mapped and/or wildcard sockets.

  * In `encode_inet_addr', try to match v4 remote addresses against
    local v6-mapped and/or wildcard sockets.

  * Complicate `return_fake_name' to optionally v6-map an IPv4 address.

  * Introduce and deploy a new `return_fake_peer' function, which
    inspects a socket's local address to discover what its `native'
    address family is, so that it can map the remote address if

  * Complicate `do_implicit_bind' so that it will v6-map the local
    address it's decided on, if necessary.  This is essential now as a
    means of recording the socket's `native' address family, as used by

  * Complicate `fixup_client_socket' to unmap remote v6-mapped v4
    addresses before trying to encode them as Unix-domain addresses.

8 months agonoip.c (do_implicit_bind): Report the local address that we chose.
Mark Wooding [Wed, 6 Jun 2018 19:30:04 +0000 (20:30 +0100)]
noip.c (do_implicit_bind): Report the local address that we chose.

8 months agonoip.c (fixup_client_socket): Reorder the preflight checks.
Mark Wooding [Wed, 6 Jun 2018 19:25:51 +0000 (20:25 +0100)]
noip.c (fixup_client_socket): Reorder the preflight checks.

Superficially, it looks as if `acl_allows_p' will be cheaper than
`real_getsockname'.  But actually, if `acl_allows_p' passes the remote
address then we'll end up doing a `real_getsockname' anyway in order to
decide whether we need to substitute an unfaked socket, so this is a
false economy.

This shouldn't actually change the effective behaviour, but it will
improve performance -- not that this hack is especially performance

8 months agonoip.c: Factor out the non-implicit-binding parts of `do_implicit_bind'.
Mark Wooding [Wed, 6 Jun 2018 19:22:04 +0000 (20:22 +0100)]
noip.c: Factor out the non-implicit-binding parts of `do_implicit_bind'.

The function's other responsibilities are taken over by a new function
`fixup_client_socket'.  When I did this, I anticipated that I was going
to have to make the latter rather more complicated, but it turns out
that it's not actually that far off.

No functional change, though the new function takes a different approach
to producing the same effective control flow.

8 months agonoip.c (encode_..._inet_addr: Abstract out checking a single address.
Mark Wooding [Wed, 6 Jun 2018 19:10:14 +0000 (20:10 +0100)]
noip.c (encode_..._inet_addr: Abstract out checking a single address.

There's this common pattern of building the Unix-domain socket address,
probing its status, maybe unlinking the socket if it's stale, and
returning the result.  Let's only write that once.

No functional change.

8 months agonoip.c: Add commentary to some hairier functions.
Mark Wooding [Wed, 6 Jun 2018 19:04:16 +0000 (20:04 +0100)]
noip.c: Add commentary to some hairier functions.

No code change.

8 months agonoip.c (encode_inet_addr): Exit early rather than branch round.
Mark Wooding [Wed, 6 Jun 2018 19:00:05 +0000 (20:00 +0100)]
noip.c (encode_inet_addr): Exit early rather than branch round.

Promote the wildcard probe to the main line, and leave early -- to the
handy `found' label we just hoisted -- if the exact match was
acceptable.  This structure is more convenient for adding a more
complicated search strategy later.

No functional change.

8 months agonoip.c (encode_inet_addr): Hoist `found' label to top-level.
Mark Wooding [Wed, 6 Jun 2018 18:55:44 +0000 (19:55 +0100)]
noip.c (encode_inet_addr): Hoist `found' label to top-level.

No functional change: the control flow is as it was before, but this
structure invites use of the label from the other branch of the main

8 months agonoip.c (get{sock,peer}name): Don't clobber `errno'.
Mark Wooding [Wed, 6 Jun 2018 18:47:43 +0000 (19:47 +0100)]
noip.c (get{sock,peer}name): Don't clobber `errno'.

We might return a failure here, if the underlying syscall fails, and
should propagate the `errno' it returned.

Also hoist out some block-scope variables now that their enclosing block
has vanished.

8 months agonoip.c ({get,set}sockopt): Stub support for IPv6 options too.
Mark Wooding [Wed, 6 Jun 2018 18:45:12 +0000 (19:45 +0100)]
noip.c ({get,set}sockopt): Stub support for IPv6 options too.

These are many and hairy, and this might cause trouble, but I'll risk it
for now.

8 months agonoip.c: Replace `SOL_...' with `IPPROTO_...'.
Mark Wooding [Wed, 6 Jun 2018 18:44:36 +0000 (19:44 +0100)]
noip.c: Replace `SOL_...' with `IPPROTO_...'.

Apparently this is the POSIX way.  The numbers are the same, so

8 months agonoip.c: Replace `WANT_...' constants with flags for `encode_inet_addr'.
Mark Wooding [Wed, 6 Jun 2018 18:40:29 +0000 (19:40 +0100)]
noip.c: Replace `WANT_...' constants with flags for `encode_inet_addr'.

I originally expected that I'd want to add some more flags here, but it
turned out that I was mistaken.  I think this is better anyway, and I
intend to continue this pattern elsewhere.

No functional change.

8 months agonoip.c (encode_..._inet_addr): Only call `port_from_sockaddr' once.
Mark Wooding [Wed, 6 Jun 2018 18:32:30 +0000 (19:32 +0100)]
noip.c (encode_..._inet_addr): Only call `port_from_sockaddr' once.

Just a small cleanup; no functional change.

8 months agonoip.c (acl_allows_p): Check that the ACL node address family is right.
Mark Wooding [Wed, 6 Jun 2018 19:11:56 +0000 (20:11 +0100)]
noip.c (acl_allows_p): Check that the ACL node address family is right.

Oops.  `sockaddr_in_range_p' can't check this, because it can only see
one address family.

8 months agonoip.c: Placate GCC warning about `misleading' layout.
Mark Wooding [Wed, 6 Jun 2018 18:42:30 +0000 (19:42 +0100)]
noip.c: Placate GCC warning about `misleading' layout.

I think I prefer the way it was, but I'll go with having a quiet life.

2 years agonoip.[c1]: New configuration feature for setting local addresses.
Mark Wooding [Mon, 2 May 2016 22:03:02 +0000 (23:03 +0100)]
noip.[c1]: New configuration feature for setting local addresses.

Some servers are picky about which addresses they're willing to accept
connections from.  Unfortunately, `noip' doesn't pick sensible local
addresses when implicitly binding sockets.  It can't usefully consult
the routing table (because we may be trying to simulate an entirely
fictional network of which the kernel knows nothing).  About the best we
can do is allow the user to configure the local address selection.

Add a new `impbind' configuration command which adds an entry to a list
of rules for choosing implicit binding addresses.

2 years agonoip.1: Describe ACL entries in terms of <address-range> and <port-range>.
Mark Wooding [Mon, 2 May 2016 22:00:12 +0000 (23:00 +0100)]
noip.1: Describe ACL entries in terms of <address-range> and <port-range>.

This corresponds with the newly refactored code.

2 years agonoip.c: Factor out address-range handling functions.
Mark Wooding [Mon, 2 May 2016 22:05:07 +0000 (23:05 +0100)]
noip.c: Factor out address-range handling functions.

  * Introduce `parse_addrrange' and `foreach_addrrange' for parsing.
    The former captures a representation of the range syntax, which can
    contain things like `local' that actually cover multiple ranges, and
    the latter iterates over the implied address ranges.

  * Introduce `dump_addrrange' to produce a readable description of a
    range in the debugging output.

No functional changes.

2 years agonoip.c (parse_acl_env): Move next to `parse_acl_line'.
Mark Wooding [Mon, 2 May 2016 21:38:57 +0000 (22:38 +0100)]
noip.c (parse_acl_env): Move next to `parse_acl_line'.

2 years agonoip.c (encode_inet_addr): Avoid collisions with wildcard addresses.
Mark Wooding [Mon, 2 May 2016 21:35:42 +0000 (22:35 +0100)]
noip.c (encode_inet_addr): Avoid collisions with wildcard addresses.

If the caller is wanting to `encode' a currently floating socket (i.e.,
no explicit port number has been set and we're meant to pick one), then
make sure we pick a port number which doesn't collide with either the
chosen address /or/ the address-family wildcard address.  Otherwise, we
can get into the situation where process A listens on a floating socket
with a wildcard address, tells process B which port was allocated, and
then process B binds to localhost, tries to connect to A, and is stymied
because B actually allocated the same port number itself.

Really we ought to seed the RNG separately for each process.

2 years agonoip.c: Add debugging to most of the syscall wrappers.
Mark Wooding [Mon, 2 May 2016 21:28:36 +0000 (22:28 +0100)]
noip.c: Add debugging to most of the syscall wrappers.

2 years agonoip.c (present_sockaddr): Handle a null address pointer.
Mark Wooding [Mon, 2 May 2016 21:43:31 +0000 (22:43 +0100)]
noip.c (present_sockaddr): Handle a null address pointer.

We'll want this functionality soon.

2 years agonoip.c: Have parsers fail if there's trailing junk.
Mark Wooding [Mon, 2 May 2016 21:26:35 +0000 (22:26 +0100)]
noip.c: Have parsers fail if there's trailing junk.

2 years agonoip.c: Include the process-id in debugging output.
Mark Wooding [Mon, 2 May 2016 21:20:25 +0000 (22:20 +0100)]
noip.c: Include the process-id in debugging output.

Reading dumps from complicated multi-process systems can be tricky

2 years agonoip.c (parse_acl_line): Continue correctly after ADDRESS/PREFIX-LEN.
Mark Wooding [Mon, 2 May 2016 21:05:40 +0000 (22:05 +0100)]
noip.c (parse_acl_line): Continue correctly after ADDRESS/PREFIX-LEN.

After an ADDRESS/PREFIX-LEN entry, the following delimiter will have
been consumed; make sure to put it back.

2 years agonoip.c: Hack ioctl(2) as well.
Mark Wooding [Mon, 2 May 2016 12:28:24 +0000 (13:28 +0100)]
noip.c: Hack ioctl(2) as well.

It appears that Java's network machinery does lots of probing of network
addresses with ioctl(2), and /some/ of these ioctls don't work well with
Unix-domain sockets.  If we see one of these, then make a temporary
Internet socket and do the ioctl on that instead.

This really is quite unpleasant, but it seems to work well enough to
make Gradle work, for example.

2 years agonoip.c (fixup_real_ip_socket): Support for temporary fixups.
Mark Wooding [Mon, 2 May 2016 12:26:10 +0000 (13:26 +0100)]
noip.c (fixup_real_ip_socket): Support for temporary fixups.

Add a new argument to `fixup_real_ip_socket' where it can return a
temporary fixed-up copy of the input socket.  Sort out the call sites to
pass a null pointer (requesting the previous behaviour).

2 years agonoip.c: Fix some holdovers with hardcoded address families.
Mark Wooding [Mon, 2 May 2016 12:24:53 +0000 (13:24 +0100)]
noip.c: Fix some holdovers with hardcoded address families.

Now all of the references to `_INET' are in the `Address-type hacking'
section where they belong.  This should really have been done as part of
the IPv6 work, but unaccountably wasn't.

2 years agonoip.1: Fix source formatting.
Mark Wooding [Mon, 2 May 2016 21:59:16 +0000 (22:59 +0100)]
noip.1: Fix source formatting.

2 years agonoip.c: Make sure parsers update the cursor when they finish.
Mark Wooding [Mon, 2 May 2016 21:25:35 +0000 (22:25 +0100)]
noip.c: Make sure parsers update the cursor when they finish.

Even the ones which don't expect anything else to follow.

2 years agonoip.c (parse_acl_line): Don't skip on past a zero byte.
Mark Wooding [Mon, 2 May 2016 21:23:39 +0000 (22:23 +0100)]
noip.c (parse_acl_line): Don't skip on past a zero byte.

2 years agonoip.c: Add `const' qualifiers on `aclnode *' arguments.
Mark Wooding [Mon, 2 May 2016 21:09:22 +0000 (22:09 +0100)]
noip.c: Add `const' qualifiers on `aclnode *' arguments.

2 years agonoip.c: Missing blank line.
Mark Wooding [Mon, 2 May 2016 21:09:59 +0000 (22:09 +0100)]
noip.c: Missing blank line.

Very important.

2 years agonoip.c (decode_inet_addr): Fix doc comment.
Mark Wooding [Mon, 2 May 2016 12:24:53 +0000 (13:24 +0100)]
noip.c (decode_inet_addr): Fix doc comment.

2 years agoMakefile: Actually distribute `debian/source/format'.
Mark Wooding [Fri, 29 Apr 2016 20:17:38 +0000 (21:17 +0100)]
Makefile: Actually distribute `debian/source/format'.

Did it in too much of a rush.

2 years agoRelease 1.1.3. 1.1.3
Mark Wooding [Mon, 25 Apr 2016 13:51:33 +0000 (14:51 +0100)]
Release 1.1.3.

2 years agonoip.c: Fix memset length error.
Mark Wooding [Mon, 25 Apr 2016 13:23:33 +0000 (14:23 +0100)]
noip.c: Fix memset length error.

Reported by Ian Jackson; thanks.

2 years agoRelease 1.1.2. 1.1.2
Mark Wooding [Sat, 16 Apr 2016 14:59:47 +0000 (15:59 +0100)]
Release 1.1.2.

2 years agonoip.c (create_sockdir): Make sure the socket directory isn't a symlink.
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
noip.c (create_sockdir): Make sure the socket directory isn't a symlink.

Oh, dear.  This is a long-standing bug, and a bad one for systems which
don't set per-user $TMPDIR directories.

2 years agoRelease 1.1.1. 1.1.1
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
Release 1.1.1.

2 years agodebian/: Multi-Arch support.
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
debian/: Multi-Arch support.

2 years agodebian/control: Fix Build-Depends.
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
debian/control: Fix Build-Depends.

2 years agodebian/source/format: Apparently we need one of these nowadays.
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
debian/source/format: Apparently we need one of these nowadays.

2 years agodebian/control: `fw' changed name to `fwd' in 2008.
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
debian/control: `fw' changed name to `fwd' in 2008.

Maybe it's time this package caught up.

4 years agoRelease 1.1.0. 1.1.0
Mark Wooding [Thu, 24 Apr 2014 08:36:54 +0000 (09:36 +0100)]
Release 1.1.0.

Now with IPv6.

4 years agoREADME: Fettle to include IPv6, and update configuration.
Mark Wooding [Thu, 24 Apr 2014 09:12:48 +0000 (10:12 +0100)]
README: Fettle to include IPv6, and update configuration.

4 years agonoip.c, noip.1: Add IPv6 support.
Mark Wooding [Wed, 23 Apr 2014 23:15:52 +0000 (00:15 +0100)]
noip.c, noip.1: Add IPv6 support.

Just like that.  Of course, the hard work was done earlier.

4 years agonoip.c, noip.1: Multiple address family support.
Mark Wooding [Wed, 23 Apr 2014 09:49:30 +0000 (10:49 +0100)]
noip.c, noip.1: Multiple address family support.

Abstract out all of the address-family-specific hacking into a
collection of utility functions.  Now, with a little luck, adding
additional address families later will be straightforward.

The main casualty is the notional support for arbitrary netmasks, though
in fact they never worked correctly.  They've now been silently dropped:
the new parser simply refuses to try.

4 years agonoip.c (get_local_ipaddrs): Rewrite to use getifaddrs(3).
Mark Wooding [Fri, 25 Apr 2014 08:49:26 +0000 (09:49 +0100)]
noip.c (get_local_ipaddrs): Rewrite to use getifaddrs(3).

This is a much better function to use because it actually gives us all
of the addresses on each interface rather than just the first.

Also, discard duplicate addresses, because they're more likely now.  We
should have done this already, but unaccountably neglected to.

4 years agoFix the GPL notices.
Mark Wooding [Fri, 25 Apr 2014 08:32:14 +0000 (09:32 +0100)]
Fix the GPL notices.

6 years agonoip.c: Allow PF_NETLINK sockets. 1.0.8
Mark Wooding [Tue, 13 Mar 2012 21:30:14 +0000 (21:30 +0000)]
noip.c: Allow PF_NETLINK sockets.

Anything fiddling with them probably knows what its doing.  Chromium
fails unless it can get one.

6 years agodebian/rules: Switch to using debhelper 9 directly.
Mark Wooding [Tue, 13 Mar 2012 21:29:51 +0000 (21:29 +0000)]
debian/rules: Switch to using debhelper 9 directly.

6 years agonoip.c: Shut up some GCC warnings.
Mark Wooding [Tue, 13 Mar 2012 21:28:39 +0000 (21:28 +0000)]
noip.c: Shut up some GCC warnings.

I have no idea what fixup_p was meant to mean, but it's gone now.

7 years Fix bashism (`export VAR=VALUE'). 1.0.7
Mark Wooding [Fri, 10 Jun 2011 20:00:07 +0000 (21:00 +0100)] Fix bashism (`export VAR=VALUE').

For some reason, under `dash', this causes (say) `noip' to work
correctly for exactly one level of nesting.  An attempt to invoke a
nested `noip' results in

export: 4: bad variable name

This appears to be a result of `dash' doing word splitting too early.

8 years agoRelease 1.0.6. 1.0.6
Mark Wooding [Mon, 14 Jun 2010 00:27:44 +0000 (01:27 +0100)]
Release 1.0.6.

8 years agonoip.c: Remove hints that we might intercept close(2).
Mark Wooding [Sat, 5 Jun 2010 13:45:58 +0000 (14:45 +0100)]
noip.c: Remove hints that we might intercept close(2).

We don't because glibc makes it too hard.

8 years agonoip.c: Make sure it's an AF_UNIX address before counting the length.
Mark Wooding [Sat, 5 Jun 2010 13:45:01 +0000 (14:45 +0100)]
noip.c: Make sure it's an AF_UNIX address before counting the length.

8 years agoMakefile: Cardboard cutout silent rules build.
Mark Wooding [Sat, 5 Jun 2010 10:53:59 +0000 (11:53 +0100)]
Makefile: Cardboard cutout silent rules build.

8 years agonoip.c: Silence GCC warnings about unused return values.
Mark Wooding [Sat, 5 Jun 2010 10:53:37 +0000 (11:53 +0100)]
noip.c: Silence GCC warnings about unused return values.

Actually act on errors from fgets while skipping the header on
/proc/net/unix, even though it's unlikely to be bad and we'll fail
later anyway.  The write in printerr is not worth worrying about.

8 years agonoip.c: Boring whitespace fixes.
Mark Wooding [Sat, 5 Jun 2010 10:52:11 +0000 (11:52 +0100)]
noip.c: Boring whitespace fixes.

9 years agoRelease 1.0.5. 1.0.5
Mark Wooding [Sat, 26 Dec 2009 12:17:10 +0000 (12:17 +0000)]
Release 1.0.5.

9 years agoMerge branch 'master' of metalzone:public-git/preload-hacks
Mark Wooding [Sat, 26 Dec 2009 12:16:09 +0000 (12:16 +0000)]
Merge branch 'master' of metalzone:public-git/preload-hacks

* 'master' of metalzone:public-git/preload-hacks:
  Version 1.0.4.
  noip (decode_inet_addr): Be more careful when converting addresses.
  noip: Don't try to support families other than AF_UNIX and AF_INET.

9 years agonoip.c: Only fiddle with `errno' from `connect' if we faked things.
Mark Wooding [Sat, 26 Dec 2009 12:15:34 +0000 (12:15 +0000)]
noip.c: Only fiddle with `errno' from `connect' if we faked things.

Otherwise some programs get confused.

9 years agoREADME: Add some more notes about how useful `noip' is.
Mark Wooding [Sat, 26 Dec 2009 12:15:11 +0000 (12:15 +0000)]
README: Add some more notes about how useful `noip' is.

10 years agoVersion 1.0.4. 1.0.4
Mark Wooding [Mon, 12 Jan 2009 17:57:54 +0000 (17:57 +0000)]
Version 1.0.4.

10 years agonoip (decode_inet_addr): Be more careful when converting addresses.
Mark Wooding [Mon, 12 Jan 2009 17:53:35 +0000 (17:53 +0000)]
noip (decode_inet_addr): Be more careful when converting addresses.

The old version of decode_inet_addr would convert empty Unix-domain
addresses to wildcard Internet addresses, which is erroneous in a number
of situations.  In particular, this causes problems in some servers
which maintain parallel Unix-domain and Internet listening sockets, and
use the address family reported by accept(2) to decide what to do: if
the incoming connection is from an unbound (but real) Unix-domain
socket, it gets misinterpreted.

This fixes decode_inet_addr to be more selective about its decoding of
empty addresses.  It must do the decoding when swapping in a genuine IP
socket, but when called via return_fake_name it's wrong to do this: a
remote socket which ought to be decoded will have been bound either
explicitly by the peer or implicitly by do_implicit_bind.  (Actually,
getsockname might now be wrong when called on an unbound socket, but
that's probably a small price to pay -- and there's no way of returning
the right answer in this case anyway.)

10 years agonoip: Don't try to support families other than AF_UNIX and AF_INET.
Mark Wooding [Mon, 12 Jan 2009 17:21:58 +0000 (17:21 +0000)]
noip: Don't try to support families other than AF_UNIX and AF_INET.

If there's demand, I might try to hack in IPv6 later.  But not now.

10 years agoVersion 1.0.3. 1.0.3
Mark Wooding [Mon, 22 Dec 2008 01:24:48 +0000 (01:24 +0000)]
Version 1.0.3.

10 years agodebian: Add lintian-overrides.
Mark Wooding [Mon, 22 Dec 2008 01:23:12 +0000 (01:23 +0000)]
debian: Add lintian-overrides.

The libraries we ship aren't for linking against, so they don't need