]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
8 years agoUnset $ifsuffix for non protocol reasons
Roy Marples [Thu, 6 Jul 2017 16:13:51 +0000 (17:13 +0100)] 
Unset $ifsuffix for non protocol reasons

Summary:
The default was to assume unspecified reasons were DHCP.
This is bad for non protocol events such as NOCARRIER which could
cause a dhcpcd instance running IPv6 only to wipe out the DNS
records created by a separate dhcpcd instance handling IPv4.

Fixes T129.

Test Plan:
Start `dhcpcd -4 -K eth0`.
Observe that a resolvconf entry is created for eth0.dhcp.
Start `dhcpcd -6 eth0`.
Observe that a resolvconf entry is created for eth0.dhcp6.
Bring the carrier down for eth0.
Because the -4 instance is ignoring carrier, it is expected that
the eth0.dhcp resolvconf entry is preserved.

Maniphest Tasks: T129

Differential Revision: https://dev.marples.name/D124

8 years agoFix sefault when address lifetime overflows
Roy Marples [Thu, 13 Jul 2017 13:05:57 +0000 (14:05 +0100)] 
Fix sefault when address lifetime overflows

Simplify by remembering the address's interface after interface
enumeration.
While here, rename ap to ia some more.

8 years agodhcp: return routes when renewing
Roy Marples [Thu, 18 May 2017 13:54:16 +0000 (14:54 +0100)] 
dhcp: return routes when renewing

Summary:
If we only return our routes in the BOUND state, our working
routes could be deleted if we're in the RENEWING state and another
interface applies it's routes.

Fixes T118.

Test Plan:
start dhcpcd on two interfaces and ensure both get a lease
kill the DHCP server an one interface and wait for renewal.
when one interface renews, no routes should be deleted.

Reviewers: werebear77

Subscribers: werebear77

Maniphest Tasks: T118

Differential Revision: https://dev.marples.name/D113

8 years agoTreat INFORMED as a released state so it's dropped by the hooks
Roy Marples [Thu, 6 Jul 2017 16:25:40 +0000 (17:25 +0100)] 
Treat INFORMED as a released state so it's dropped by the hooks

8 years agoUpdate to the real stock dhcpcd.conf
Roy Marples [Tue, 4 Jul 2017 15:05:36 +0000 (16:05 +0100)] 
Update to the real stock dhcpcd.conf

8 years agoFix processing of INFORM6 replies without an OK status code.
Roy Marples [Tue, 4 Jul 2017 14:29:58 +0000 (15:29 +0100)] 
Fix processing of INFORM6 replies without an OK status code.

While where, ensure that failure to malloc a buffer to print
the status message returns -1 rather than false to indicate an
error.

8 years agoWhitespace
Roy Marples [Tue, 4 Jul 2017 13:39:09 +0000 (14:39 +0100)] 
Whitespace

8 years agoAlways set the outgoing interface when creating non reject routes on BSD.
Roy Marples [Tue, 4 Jul 2017 13:36:01 +0000 (14:36 +0100)] 
Always set the outgoing interface when creating non reject routes on BSD.

8 years agoOnly start discovery on lease expiration if we have a carrier.
Roy Marples [Tue, 4 Jul 2017 11:22:56 +0000 (12:22 +0100)] 
Only start discovery on lease expiration if we have a carrier.

8 years agoAdd a return value to deleteing events and timers so we know
Roy Marples [Mon, 3 Jul 2017 20:35:39 +0000 (21:35 +0100)] 
Add a return value to deleteing events and timers so we know
if something was really affected.

8 years agoFix a valgrind error.
Roy Marples [Sat, 1 Jul 2017 10:56:33 +0000 (11:56 +0100)] 
Fix a valgrind error.

8 years agoFix a runtime shift error.
Maya Rashish [Fri, 30 Jun 2017 15:51:49 +0000 (16:51 +0100)] 
Fix a runtime shift error.

8 years agoFix crash when creating routes for a non preferred lease.
Roy Marples [Sat, 24 Jun 2017 16:36:12 +0000 (17:36 +0100)] 
Fix crash when creating routes for a non preferred lease.

Summary:
When dhcpcd shares the same IP address across interfaces, the
non preferred leases have the address deleted but remain in
the BOUND state.
We need to check that the address has been added, otherwise
we crash when building some routes.

Thanks to Jason A. Donenfeld <Jason@zx2c4.com> for the report.

Test Plan:
Ensure the lowest metric interface is denied in denyinterfaces.
Setup your DHCP server to share the same IP addres to all the host interfaces.
Start dhcpcd.
Activate the denied interface via `dhcpcd -n $interface`.
dhcpcd should not crash when binding the routes.

Tags: #dhcpcd

Differential Revision: https://dev.marples.name/D121

8 years agoNow print_option is fully checked, we can avoid a malloc here now.
Roy Marples [Fri, 16 Jun 2017 09:20:15 +0000 (10:20 +0100)] 
Now print_option is fully checked, we can avoid a malloc here now.

8 years agoCheck return values of snprintf and print_option correctly.
Roy Marples [Fri, 16 Jun 2017 09:19:57 +0000 (10:19 +0100)] 
Check return values of snprintf and print_option correctly.

8 years agoUse a better errno for running out of buffer.
Roy Marples [Fri, 16 Jun 2017 08:40:41 +0000 (09:40 +0100)] 
Use a better errno for running out of buffer.

8 years agoClarify RFC952 and RFC1123 to justify domain name restriction dhcpcd imposes.
Roy Marples [Fri, 16 Jun 2017 08:38:29 +0000 (09:38 +0100)] 
Clarify RFC952 and RFC1123 to justify domain name restriction dhcpcd imposes.

8 years agoRevert "RFC2181 section 11 says a DNS label can be pretty much anything."
Roy Marples [Fri, 16 Jun 2017 07:51:46 +0000 (08:51 +0100)] 
Revert "RFC2181 section 11 says a DNS label can be pretty much anything."

This reverts commit 6da580eefb0d94d1b377303e84af821556ab33b0.

8 years agoCount label and domain name length correctly.
Roy Marples [Wed, 14 Jun 2017 10:52:26 +0000 (11:52 +0100)] 
Count label and domain name length correctly.

8 years agoRFC2181 section 11 says a DNS label can be pretty much anything.
Roy Marples [Tue, 13 Jun 2017 21:01:58 +0000 (22:01 +0100)] 
RFC2181 section 11 says a DNS label can be pretty much anything.
So just test overall length and label length.

Thanks to Robert Elz.

8 years agoMake ipv6_newaddr() more flexable so it's the sole source of
Roy Marples [Tue, 13 Jun 2017 19:47:49 +0000 (20:47 +0100)] 
Make ipv6_newaddr() more flexable so it's the sole source of
creating ipv6_addr structures.

8 years agoNo need for signal.h here.
Roy Marples [Tue, 13 Jun 2017 19:19:52 +0000 (20:19 +0100)] 
No need for signal.h here.

8 years agoUse a long constant to avoid a lint error.
Roy Marples [Tue, 13 Jun 2017 19:09:58 +0000 (20:09 +0100)] 
Use a long constant to avoid a lint error.

8 years agoRemove some unused variables.
Roy Marples [Tue, 13 Jun 2017 19:06:13 +0000 (20:06 +0100)] 
Remove some unused variables.

8 years agollen is unused here.
Roy Marples [Tue, 13 Jun 2017 18:42:03 +0000 (19:42 +0100)] 
llen is unused here.

8 years agoGuard MAX_RTR_SOLICITATION_DELAY if platform defined.
Roy Marples [Tue, 13 Jun 2017 18:39:56 +0000 (19:39 +0100)] 
Guard MAX_RTR_SOLICITATION_DELAY if platform defined.

8 years agoAdd a lint target.
Roy Marples [Tue, 13 Jun 2017 18:19:09 +0000 (19:19 +0100)] 
Add a lint target.

8 years agoFix a lint issue.
Roy Marples [Tue, 13 Jun 2017 18:16:38 +0000 (19:16 +0100)] 
Fix a lint issue.

8 years agoTypo
Roy Marples [Tue, 13 Jun 2017 15:53:26 +0000 (16:53 +0100)] 
Typo

8 years agoRemove unused valid_path() function.
Roy Marples [Tue, 13 Jun 2017 15:07:46 +0000 (16:07 +0100)] 
Remove unused valid_path() function.

Thanks to Robert Elz.

8 years agoOptimize loop exit. Thanks to Robert Elz.
Roy Marples [Tue, 13 Jun 2017 14:52:27 +0000 (15:52 +0100)] 
Optimize loop exit. Thanks to Robert Elz.

8 years agoRemove usesless comment.
Roy Marples [Tue, 13 Jun 2017 14:45:55 +0000 (15:45 +0100)] 
Remove usesless comment.

8 years agoIn uniqify(), prefix a space if there is already a result when appending.
Roy Marples [Tue, 13 Jun 2017 14:29:45 +0000 (15:29 +0100)] 
In uniqify(), prefix a space if there is already a result when appending.
This means we don't have to trim a space on output.

8 years agodhcp: Fix classless static routes
Roy Marples [Mon, 29 May 2017 20:03:25 +0000 (22:03 +0200)] 
dhcp: Fix classless static routes

Summary:
Assign the netwask correctly from the message.
Fixes T122.

Test Plan: Test dhcpcd using the Classless Static Routes DHCP option.

Reviewers: c_14

Reviewed By: c_14

Maniphest Tasks: T122

Differential Revision: https://dev.marples.name/D116

8 years agoHardware Address validation
Roy Marples [Sat, 20 May 2017 12:51:41 +0000 (13:51 +0100)] 
Hardware Address validation

Summary:
The all zero's and all one's hardware address are reserved.
As such, they should not be used in dhcpcd.
Likewise, Router Solicitation messages should not contain an
all zero source address option.

Fixes T119.

Test Plan:
Request IPv6RA over a PPP interface on a suitable OS which assigns
an all zero's or all one's hardware address.

Maniphest Tasks: T119

Differential Revision: https://dev.marples.name/D114

8 years agoOnly reboot activated user interfaces.
Roy Marples [Mon, 15 May 2017 16:43:31 +0000 (17:43 +0100)] 
Only reboot activated user interfaces.

8 years agoPrefix Delegation: build routes after all addresses delegated
Roy Marples [Mon, 15 May 2017 12:10:17 +0000 (13:10 +0100)] 
Prefix Delegation: build routes after all addresses delegated

Summary:
When addresses are delegated the routing for them needs to be
managed. But this can be done after all addresses have been
added because DaD will cause the scripts to be run shortly
after adding all of them.

The only problem with this approach is when dhcpcd is restarted
and adds a delegation which already exists. In this case,
dhcpcd will log it added the route after it ran the hook script.
This is of course incorrect because the route should already be
there and working - assuming dhcpcd is the sole changer of the route.

Fixes T117 because rebuilding the routes inside the enumeration
of interfaces may change the order of interfaces and thus break
the enumeration.

Test Plan:
Setup dhcpcd to request delegation to many interfaces.
Once delegation is assigned, drop and restore carrier on the upstream interface.
Observe dhcpcd assigns delegations to all interfaces with carriers.

Reviewers: sthen

Reviewed By: sthen

Maniphest Tasks: T117

Differential Revision: https://dev.marples.name/D112

8 years agoRemove abrt as it's unused and change carrier_warned to a bool.
Roy Marples [Mon, 15 May 2017 10:56:30 +0000 (11:56 +0100)] 
Remove abrt as it's unused and change carrier_warned to a bool.

8 years agoWarn about IA_PD support not being compiled in when requesting it
Roy Marples [Mon, 15 May 2017 08:59:52 +0000 (09:59 +0100)] 
Warn about IA_PD support not being compiled in when requesting it
in dhcpcd.conf.
Remove more IA_PD code to reduce small binary.

8 years agoIt's possible to receive a DHCPv6 lease without an address.
Roy Marples [Mon, 15 May 2017 08:58:36 +0000 (09:58 +0100)] 
It's possible to receive a DHCPv6 lease without an address.

8 years agoPrepare dhcpcd-7.0.0-rc1 v7.0.0-rc1
Roy Marples [Wed, 10 May 2017 10:24:28 +0000 (11:24 +0100)] 
Prepare dhcpcd-7.0.0-rc1

8 years agoRemove more prefix delegation code for small binaries.
Roy Marples [Tue, 9 May 2017 11:40:28 +0000 (12:40 +0100)] 
Remove more prefix delegation code for small binaries.

8 years agoDon't crash when --static routers= is given on the command line.
Roy Marples [Tue, 9 May 2017 11:29:40 +0000 (12:29 +0100)] 
Don't crash when --static routers= is given on the command line.

T116 will make it work for the control socket.

8 years agoRestore -G, --nogateway.
Roy Marples [Tue, 9 May 2017 11:06:18 +0000 (12:06 +0100)] 
Restore -G, --nogateway.

Because T116 is not fixed.
This reverts 0b27f5d7cf4c.

8 years agoInstall dhcpcd-definitions.conf to correct directory.
Roy Marples [Mon, 8 May 2017 08:34:11 +0000 (09:34 +0100)] 
Install dhcpcd-definitions.conf to correct directory.

8 years agoApply the real D108 patch, my bad.
Roy Marples [Fri, 5 May 2017 13:59:00 +0000 (14:59 +0100)] 
Apply the real D108 patch, my bad.

8 years agoDHCPv6: deprecate addresses on stale leases.
Roy Marples [Mon, 24 Apr 2017 19:50:45 +0000 (20:50 +0100)] 
DHCPv6: deprecate addresses on stale leases.

Summary:
When a DHCPv6 Address or Prefix Delegation is leased, it may not be renewed as a
different one could be assigned. In this situation, we should
prompt the kernel to prefer this new one by deprecating the old
one. This is achieved by setting it's pltime to zero.

Related to T114.

Test Plan:
Configure your DHCPv6 server to assign a delegation from Pool A.
Configure dhcpcd to lease a Prefix delegation and assign it
to a downstream interface.
Start dhcpcd.
Configure your DHCPv6 server to asssign a delegation from Pool B.
Down/Up the link dhcpcd is using.
dhcpcd should assign the new delegation and depreate the old
by marking it's pltime as zero.

Reviewers: sthen, Harri

Reviewed By: Harri

Differential Revision: https://dev.marples.name/D108

8 years agoIPv6: show actual address lifetimes being applied
Roy Marples [Wed, 26 Apr 2017 08:57:16 +0000 (09:57 +0100)] 
IPv6: show actual address lifetimes being applied

Summary:
For IPv6, the acquisition time of the address is stored.
When adding the address during a refresh, the valid and preferred
times are decreased by the difference between the acquisition time
and the current time. This is not shown in the logs, but it should
be otherwise you could be confused by a prefix adding an address,
but it really came from a stale lease.

While here, if vltime overflows then log an error and zero it.
This effectively removes the address when it's added.

Related to T114.

Test Plan:
Configure your DHCPv6 server to lease a Prefix from Pool A.
Configure dhcpcd to request a Prefix Delegation and assign to
a downstream interface.
Start dhcpcd.
Configure your DHCPv6 server to lease a Prefix from Pool B.
Observe dhcpcd debug logs - it should note that addresses
previously assigned from group A have decreasing valid times.

Reviewers: Harri

Reviewed By: Harri

Differential Revision: https://dev.marples.name/D110

8 years agoDHCPv6: drop Prefix Delegations when dropping the lease.
Roy Marples [Tue, 2 May 2017 18:58:19 +0000 (19:58 +0100)] 
DHCPv6: drop Prefix Delegations when dropping the lease.

Summary:
When dropping the lease, we should drop any Delegated Prefixes
as well, because they are from the lease.
Add a note to say if this needs to be changed, at least mark
the Delegated Prefixes as deprecated.

Fixes T114.

Test Plan:
Configure dhcpcd to request a Prefix Delegation and assign it to a downstream
interface.
Bring the interface down which dhcpcd requests the delegation from.
dhcpcd should remove the assigned delegation from the other interface.

Reviewers: Harri

Reviewed By: Harri

Maniphest Tasks: T114

Differential Revision: https://dev.marples.name/D111

8 years agoWhen using gcc, add the -Wlogical-op flag when debugging.
Roy Marples [Thu, 4 May 2017 07:54:52 +0000 (08:54 +0100)] 
When using gcc, add the -Wlogical-op flag when debugging.

8 years agoFix test for preferring a fake lease vs a real one.
David Binderman [Thu, 4 May 2017 07:52:41 +0000 (08:52 +0100)] 
Fix test for preferring a fake lease vs a real one.

8 years agodhcpcd.c: Fix -n opening sockets.
Roy Marples [Thu, 20 Apr 2017 16:14:29 +0000 (17:14 +0100)] 
dhcpcd.c: Fix -n opening sockets.

Summary:
Open sockets when dumping leases OR actually starting up.
If just sending a control message or signal, don't bother.

Test Plan: Start dhcpcd using -n

Reviewers: sthen

Reviewed By: sthen

Subscribers: sthen

Differential Revision: https://dev.marples.name/D106

8 years agoAdd interface_mtu to SMALL configuration.
Roy Marples [Mon, 1 May 2017 16:30:10 +0000 (17:30 +0100)] 
Add interface_mtu to SMALL configuration.

8 years agoprefix delegation: Remove deleted addresses from consideration
Roy Marples [Mon, 24 Apr 2017 20:08:31 +0000 (21:08 +0100)] 
prefix delegation: Remove deleted addresses from consideration

Summary:
Currently dhcpcd does not free addresses generated from stale
Prefix Delegation leases which then expire. As the address
isn't likely to come back anytime soon it should be freed.

Related to T114.

Test Plan:
Configure your DHCPv6 server to lease a Prefix from Pool A.
Configure dhcpcd to request a Prefix Delegation and assign to
a downstream interface.
Start dhcpcd.
Configure your DHCPv6 server to lease a Prefix from Pool B.
Observe dhcpcd debug logs - it should detect the kernel
removing the deleted address and not re-add it when the prefix
changes.

Reviewers: Harri

Reviewed By: Harri

Differential Revision: https://dev.marples.name/D109

8 years agoBecause dhcpcd now binds to the interfaces LL address when not
Roy Marples [Tue, 25 Apr 2017 19:47:53 +0000 (20:47 +0100)] 
Because dhcpcd now binds to the interfaces LL address when not
running in master mode, the socket options SO_REUSEADDR and
SO_REUSEPORT can be dropped.
If there is a problem binding the socket, log an error.

8 years agosla could be NULL, so check that.
Roy Marples [Mon, 24 Apr 2017 16:53:05 +0000 (17:53 +0100)] 
sla could be NULL, so check that.

8 years agoBSD: Add support for RTA_LABEL.
Roy Marples [Mon, 24 Apr 2017 10:44:15 +0000 (11:44 +0100)] 
BSD: Add support for RTA_LABEL.

8 years agoBump date for prior.
Roy Marples [Sat, 22 Apr 2017 23:36:11 +0000 (00:36 +0100)] 
Bump date for prior.

8 years agoDetect VLANID to use in IAID.
Roy Marples [Sat, 22 Apr 2017 21:09:08 +0000 (22:09 +0100)] 
Detect VLANID to use in IAID.

Summary:
This only works if the VLAN interface has already been setup prior
to starting dhcpcd.

Initial fix for T115.

Test Plan:
Configure a vlan interface.
Don't set any iaid in /etc/dhcpcd.conf.
Start dhcpcd, check VLANID is used for IAID.

Reviewers: sthen

Reviewed By: sthen

Tags: #dhcpcd

Differential Revision: https://dev.marples.name/D107

8 years agoDon't log anything when printing the pidfile.
Roy Marples [Sat, 22 Apr 2017 14:41:22 +0000 (15:41 +0100)] 
Don't log anything when printing the pidfile.

8 years agoDon't report a real error here.
Roy Marples [Sat, 22 Apr 2017 08:47:00 +0000 (09:47 +0100)] 
Don't report a real error here.

8 years agoNewer OpenBSD is fixed for userland affecting address lifetime.
Roy Marples [Fri, 21 Apr 2017 23:00:51 +0000 (00:00 +0100)] 
Newer OpenBSD is fixed for userland affecting address lifetime.
Thanks to Stuart Henderson.

8 years agoStyle.
Roy Marples [Fri, 21 Apr 2017 22:33:46 +0000 (23:33 +0100)] 
Style.

8 years agoShould check that an interface name actually exists when
Roy Marples [Fri, 21 Apr 2017 22:32:42 +0000 (23:32 +0100)] 
Should check that an interface name actually exists when
setting the pidfile.

8 years agoBSD: if failed to open PF_ROUTE socket, don't set filters.
Roy Marples [Fri, 21 Apr 2017 22:21:59 +0000 (23:21 +0100)] 
BSD: if failed to open PF_ROUTE socket, don't set filters.

8 years agoClean coverity dhcpcd.xz tarball.
Roy Marples [Fri, 14 Apr 2017 09:34:18 +0000 (10:34 +0100)] 
Clean coverity dhcpcd.xz tarball.

8 years agoPrepare for dhcpcd-7.0.0-beta3 v7.0.0-beta3
Roy Marples [Fri, 14 Apr 2017 09:28:17 +0000 (10:28 +0100)] 
Prepare for dhcpcd-7.0.0-beta3

8 years agoAdd a README to describe what this does.
Roy Marples [Fri, 14 Apr 2017 09:09:51 +0000 (10:09 +0100)] 
Add a README to describe what this does.

8 years agodprintf should append, not truncate.
Roy Marples [Fri, 14 Apr 2017 09:17:27 +0000 (10:17 +0100)] 
dprintf should append, not truncate.

8 years agoFix compile on Linux
Roy Marples [Thu, 13 Apr 2017 19:12:14 +0000 (20:12 +0100)] 
Fix compile on Linux

8 years agoEnable the -r option.
Roy Marples [Thu, 13 Apr 2017 18:57:44 +0000 (19:57 +0100)] 
Enable the -r option.

8 years agoFix compile on Linux.
Roy Marples [Thu, 13 Apr 2017 18:56:06 +0000 (19:56 +0100)] 
Fix compile on Linux.

8 years agoIf no eloop mechanism has been selected for us, print a message
Roy Marples [Thu, 13 Apr 2017 16:42:55 +0000 (17:42 +0100)] 
If no eloop mechanism has been selected for us, print a message
to state which one eloop has chosen.

8 years agoFree stuff.
Roy Marples [Thu, 13 Apr 2017 15:52:53 +0000 (16:52 +0100)] 
Free stuff.

8 years agoDefault eloop to epoll on Solaris.
Roy Marples [Thu, 13 Apr 2017 15:38:17 +0000 (16:38 +0100)] 
Default eloop to epoll on Solaris.
Fix eloop-bench to work on Solaris.

8 years agoFix compile on Solaris.
Roy Marples [Thu, 13 Apr 2017 15:16:58 +0000 (16:16 +0100)] 
Fix compile on Solaris.

8 years agoAdd code to test hmac md5 expectations rather than a visual test.
Roy Marples [Thu, 13 Apr 2017 14:56:49 +0000 (15:56 +0100)] 
Add code to test hmac md5 expectations rather than a visual test.
Bump copyrights.

8 years agoStyle
Roy Marples [Thu, 13 Apr 2017 14:04:20 +0000 (15:04 +0100)] 
Style

8 years agoStyle
Roy Marples [Thu, 13 Apr 2017 14:03:19 +0000 (15:03 +0100)] 
Style

8 years agoTart up some more.
Roy Marples [Thu, 13 Apr 2017 13:56:26 +0000 (14:56 +0100)] 
Tart up some more.

8 years agoTart up some.
Roy Marples [Thu, 13 Apr 2017 13:54:18 +0000 (14:54 +0100)] 
Tart up some.

8 years agoMove test into tests.
Roy Marples [Thu, 13 Apr 2017 13:50:58 +0000 (14:50 +0100)] 
Move test into tests.
Add new test, eloop-bench to benchmark eloop.

8 years agoReset exitnow on entry in-case we are re-started after an exit.
Roy Marples [Thu, 13 Apr 2017 13:01:50 +0000 (14:01 +0100)] 
Reset exitnow on entry in-case we are re-started after an exit.

8 years agoFree logfile.
Roy Marples [Wed, 12 Apr 2017 22:51:45 +0000 (23:51 +0100)] 
Free logfile.

8 years agoFix a compile warning
Roy Marples [Wed, 12 Apr 2017 22:49:39 +0000 (23:49 +0100)] 
Fix a compile warning

8 years agoIgnore route(4) errors.
Roy Marples [Wed, 12 Apr 2017 10:16:54 +0000 (11:16 +0100)] 
Ignore route(4) errors.

8 years agoTo be consitent, do the same to loginfo as we just did for logdebug.
Roy Marples [Wed, 12 Apr 2017 10:10:20 +0000 (11:10 +0100)] 
To be consitent, do the same to loginfo as we just did for logdebug.

8 years agoAdd logdebugx, similar to logerrx and logwarnx.
Roy Marples [Wed, 12 Apr 2017 09:38:44 +0000 (10:38 +0100)] 
Add logdebugx, similar to logerrx and logwarnx.
logdebug now logs errors like logerr and logwarn.

8 years agoDon't print strerror for logerrx.
Roy Marples [Tue, 11 Apr 2017 19:45:50 +0000 (20:45 +0100)] 
Don't print strerror for logerrx.

8 years agoOver engineer the logging some more.
Roy Marples [Tue, 11 Apr 2017 19:18:41 +0000 (20:18 +0100)] 
Over engineer the logging some more.

8 years agoNote that the logfile is nolonger truncated by dhcpcd.
Roy Marples [Tue, 11 Apr 2017 17:08:41 +0000 (18:08 +0100)] 
Note that the logfile is nolonger truncated by dhcpcd.

8 years agoWrite syslog entries in logfile:
Roy Marples [Tue, 11 Apr 2017 17:04:03 +0000 (18:04 +0100)] 
Write syslog entries in logfile:
  date tag[pid]: message
This does add a few more bytes, but it allows for the same log
analysis tools to be used.
When building SMALL, this code is removed and you just get the
message in the logfile.

8 years agoUse RO_MSGFILER on NetBSD to filter route(4) messages.
Roy Marples [Tue, 11 Apr 2017 14:32:30 +0000 (15:32 +0100)] 
Use RO_MSGFILER on NetBSD to filter route(4) messages.
Adapt OpenBSD ROUTE_MSGFILTER code to use the NetBSD array for this.

8 years agoUse void to show no args.
Roy Marples [Mon, 10 Apr 2017 09:40:44 +0000 (10:40 +0100)] 
Use void to show no args.

8 years agologfile argument is not optional.
Roy Marples [Sun, 9 Apr 2017 21:42:40 +0000 (22:42 +0100)] 
logfile argument is not optional.

8 years agoCast away a coverity issue.
Roy Marples [Sun, 9 Apr 2017 19:10:01 +0000 (20:10 +0100)] 
Cast away a coverity issue.

8 years agoLog bpf_arp and bpf_bootp failures.
Roy Marples [Sun, 9 Apr 2017 19:07:38 +0000 (20:07 +0100)] 
Log bpf_arp and bpf_bootp failures.

8 years agoFix compile.
Roy Marples [Sun, 9 Apr 2017 18:51:49 +0000 (19:51 +0100)] 
Fix compile.

8 years agoFix define.
Roy Marples [Sun, 9 Apr 2017 18:26:50 +0000 (19:26 +0100)] 
Fix define.

8 years agoLOG_SYSLOG_OPTS and LOG_SYSLOG_FACILITY can set these syslog
Roy Marples [Sun, 9 Apr 2017 07:57:06 +0000 (08:57 +0100)] 
LOG_SYSLOG_OPTS and LOG_SYSLOG_FACILITY can set these syslog
options for openlog(3) at compile time.