]> git.ipfire.org Git - thirdparty/dhcpcd.git/log
thirdparty/dhcpcd.git
9 years agoExplain to Coverity why overrunning sockaddr_ll for IPoIB interfaces can happen and...
Roy Marples [Tue, 3 May 2016 10:55:57 +0000 (10:55 +0000)] 
Explain to Coverity why overrunning sockaddr_ll for IPoIB interfaces can happen and is catered for.

9 years agoFix a Coverity error by avoiding a memset with zero length.
Roy Marples [Tue, 3 May 2016 10:25:42 +0000 (10:25 +0000)] 
Fix a Coverity error by avoiding a memset with zero length.

9 years agoFix some issues reported by Converity.
Roy Marples [Tue, 3 May 2016 10:14:14 +0000 (10:14 +0000)] 
Fix some issues reported by Converity.

9 years agoTell coverity that we don't care about this errors because they
Roy Marples [Tue, 3 May 2016 09:15:28 +0000 (09:15 +0000)] 
Tell coverity that we don't care about this errors because they
are intentional.

9 years agoSolaris does not return AF_LINK addresses in getifaddrs(3), so
Roy Marples [Mon, 2 May 2016 01:55:50 +0000 (01:55 +0000)] 
Solaris does not return AF_LINK addresses in getifaddrs(3), so
link to dlpi, walk the interfaces and obtain the physical address
of each interface.

9 years agoFix compile on sunos again.
Roy Marples [Sun, 1 May 2016 14:51:10 +0000 (14:51 +0000)] 
Fix compile on sunos again.

9 years agoFix a signed/unsigned comparison.
Roy Marples [Sun, 1 May 2016 14:46:31 +0000 (14:46 +0000)] 
Fix a signed/unsigned comparison.

9 years agoTest exit status of which, not just stdout.
Roy Marples [Sun, 1 May 2016 14:39:45 +0000 (14:39 +0000)] 
Test exit status of which, not just stdout.

9 years agoNot all systems supply sys/cdefs.h and some require limits.h for PATH_MAX.
Roy Marples [Sun, 1 May 2016 14:30:08 +0000 (14:30 +0000)] 
Not all systems supply sys/cdefs.h and some require limits.h for PATH_MAX.

9 years agoPrefix dhcp definition type with OT_
Roy Marples [Sun, 1 May 2016 14:20:21 +0000 (14:20 +0000)] 
Prefix dhcp definition type with OT_

9 years agoMove last last extending into it's own option so we can use the last lease
Roy Marples [Sat, 30 Apr 2016 07:30:40 +0000 (07:30 +0000)] 
Move last last extending into it's own option so we can use the last lease
in a RFC compliant or incompliant way by choice.

9 years agoExtending dhcp lease on expire should respect ARP being disabled.
Roy Marples [Fri, 29 Apr 2016 23:09:40 +0000 (23:09 +0000)] 
Extending dhcp lease on expire should respect ARP being disabled.

9 years agoWhen the leaselease option is given, retain the lease when the DHCP lease
Roy Marples [Fri, 29 Apr 2016 22:48:19 +0000 (22:48 +0000)] 
When the leaselease option is given, retain the lease when the DHCP lease
expires, which mirrors how dhcpcd works when it starts up.
However, if any ARP probe is for the address, drop the lease right away
and continue discovery.

9 years agoAllow arp_open to be called publically.
Roy Marples [Fri, 29 Apr 2016 22:42:48 +0000 (22:42 +0000)] 
Allow arp_open to be called publically.

9 years agoKeep the ARP state open on announce so we can detect duplicates.
Roy Marples [Fri, 29 Apr 2016 22:41:51 +0000 (22:41 +0000)] 
Keep the ARP state open on announce so we can detect duplicates.

9 years agoFix a potential access after free issue.
Roy Marples [Fri, 29 Apr 2016 22:37:26 +0000 (22:37 +0000)] 
Fix a potential access after free issue.

9 years agoDescribe multiple interfaces, master mode and single interfaces better.
Roy Marples [Wed, 27 Apr 2016 22:19:16 +0000 (22:19 +0000)] 
Describe multiple interfaces, master mode and single interfaces better.

9 years agoSave BOOTP leases so they can be dumped.
Roy Marples [Wed, 27 Apr 2016 09:21:08 +0000 (09:21 +0000)] 
Save BOOTP leases so they can be dumped.
Fixes [9b7689a3a4].

9 years agoRevert prior and just move the RUNDIR check above pidfile_lock.
Roy Marples [Tue, 26 Apr 2016 20:09:34 +0000 (20:09 +0000)] 
Revert prior and just move the RUNDIR check above pidfile_lock.

9 years agoAdd a hack to ensure RUNDIR exists.
Roy Marples [Tue, 26 Apr 2016 20:07:29 +0000 (20:07 +0000)] 
Add a hack to ensure RUNDIR exists.

9 years agoEnsure we use the correct rundir.
Roy Marples [Tue, 26 Apr 2016 19:28:58 +0000 (19:28 +0000)] 
Ensure we use the correct rundir.

9 years agoLinux does not change netmask/broadcast addresses when re-adding an address.
Roy Marples [Mon, 25 Apr 2016 19:00:55 +0000 (19:00 +0000)] 
Linux does not change netmask/broadcast addresses when re-adding an address.

9 years agoUpdate remembered addresses for netmask and broadcast addresss.
Roy Marples [Mon, 25 Apr 2016 16:23:37 +0000 (16:23 +0000)] 
Update remembered addresses for netmask and broadcast addresss.

9 years agoIf a DHCP state is ARP probbed successfully and we're bound then don't do anything.
Roy Marples [Mon, 25 Apr 2016 16:23:10 +0000 (16:23 +0000)] 
If a DHCP state is ARP probbed successfully and we're bound then don't do anything.

9 years agoReport the broadcast address being added.
Roy Marples [Mon, 25 Apr 2016 13:15:56 +0000 (13:15 +0000)] 
Report the broadcast address being added.

9 years agoWe can only check rtm_pid for the correct pid - other messages
Roy Marples [Mon, 25 Apr 2016 13:03:52 +0000 (13:03 +0000)] 
We can only check rtm_pid for the correct pid - other messages
do not have this sadly.

9 years agoIgnore address removals if the broadcast address is the same as well as the
Roy Marples [Mon, 25 Apr 2016 13:03:24 +0000 (13:03 +0000)] 
Ignore address removals if the broadcast address is the same as well as the
netmask address.

9 years agoFix compile.
Roy Marples [Mon, 25 Apr 2016 11:53:33 +0000 (11:53 +0000)] 
Fix compile.

9 years agodst becomes brd as it's makes more sense as we mainly deal with ethernet.
Roy Marples [Mon, 25 Apr 2016 10:58:18 +0000 (10:58 +0000)] 
dst becomes brd as it's makes more sense as we mainly deal with ethernet.
Ensure that handleifa is always passed brd.
If brd does not match existing broadcast address on an existing inet address,
delete it and add our new one.

9 years agoWhitespace police.
Roy Marples [Mon, 25 Apr 2016 10:49:51 +0000 (10:49 +0000)] 
Whitespace police.

9 years agoCID 1358677: (Negative returns) tuck in poll_fd assignment in eloop_open(), thanks...
Roy Marples [Sun, 24 Apr 2016 19:55:22 +0000 (19:55 +0000)] 
CID 1358677: (Negative returns) tuck in poll_fd assignment in eloop_open(), thanks to Christos.

9 years agoCID 1358676: Forward NULL.
Roy Marples [Sun, 24 Apr 2016 19:46:28 +0000 (19:46 +0000)] 
CID 1358676: Forward NULL.

9 years agoRemove closefrom as we don't suffer from fd starvation.
Roy Marples [Fri, 22 Apr 2016 21:07:22 +0000 (21:07 +0000)] 
Remove closefrom as we don't suffer from fd starvation.

9 years agoClarify the reasoning for not installing a blackhole route for a PD.
Roy Marples [Thu, 21 Apr 2016 19:30:19 +0000 (19:30 +0000)] 
Clarify the reasoning for not installing a blackhole route for a PD.

9 years agoRFC3315 Section 12.1 is a little vague about adding bits to the prefix.
Roy Marples [Thu, 21 Apr 2016 19:27:31 +0000 (19:27 +0000)] 
RFC3315 Section 12.1 is a little vague about adding bits to the prefix.
The correct interpretation is that we must add bits to the prefix length,
thus having a sla_id of 0 is valid because the prefix_length is always
extended.

9 years agoRelease dhcpcd-6.10.3 v6.10.3
Roy Marples [Wed, 20 Apr 2016 08:37:23 +0000 (08:37 +0000)] 
Release dhcpcd-6.10.3

9 years agoRFC 3927 Section 2.5 says a defence of an address should ARP announce it.
Roy Marples [Wed, 20 Apr 2016 08:29:08 +0000 (08:29 +0000)] 
RFC 3927 Section 2.5 says a defence of an address should ARP announce it.
This is unicast, whereas the default kernel action is to unicast a stock
reply, so the client that tried to claim the address will receive two replies.

Fixes [a19bb0eae6].

9 years agoAdd sys/file.h so we can get to flock(2).
Roy Marples [Mon, 18 Apr 2016 12:49:35 +0000 (12:49 +0000)] 
Add sys/file.h so we can get to flock(2).

9 years agoSync latest from NetBSD.
Roy Marples [Mon, 18 Apr 2016 08:34:56 +0000 (08:34 +0000)] 
Sync latest from NetBSD.

9 years agoFix compile on BSD.
Roy Marples [Mon, 18 Apr 2016 06:14:55 +0000 (06:14 +0000)] 
Fix compile on BSD.

9 years agoImprove xsocket to have the same API as socket.
Roy Marples [Sun, 17 Apr 2016 14:00:09 +0000 (14:00 +0000)] 
Improve xsocket to have the same API as socket.

9 years agoClarify sla 0.
Roy Marples [Sat, 16 Apr 2016 21:17:49 +0000 (21:17 +0000)] 
Clarify sla 0.

9 years agoDon't drop DHCPv6 if the interface is delegated to when there are no IPv6 routers...
Roy Marples [Sat, 16 Apr 2016 21:11:54 +0000 (21:11 +0000)] 
Don't drop DHCPv6 if the interface is delegated to when there are no IPv6 routers for it.

9 years agoIf sla is 0, just copy the prefix and don't set a blackhole route if end prefix is...
Roy Marples [Sat, 16 Apr 2016 20:32:11 +0000 (20:32 +0000)] 
If sla is 0, just copy the prefix and don't set a blackhole route if end prefix is the same as the delegated prefix. Fixes [7461677bd0].

9 years agoWarn that an sla of 0 is not RFC3633 (section 12.1) compliant.
Roy Marples [Sat, 16 Apr 2016 20:30:53 +0000 (20:30 +0000)] 
Warn that an sla of 0 is not RFC3633 (section 12.1) compliant.

9 years agoSet -DHAVE_CONFIG_H after it's blanked on user config. Fixes [ceb1077c23].
Roy Marples [Wed, 13 Apr 2016 16:45:52 +0000 (16:45 +0000)] 
Set -DHAVE_CONFIG_H after it's blanked on user config. Fixes [ceb1077c23].

9 years agoMove embedded test to after setting compiler options to fix a build issue with quotes.
Roy Marples [Tue, 12 Apr 2016 20:14:42 +0000 (20:14 +0000)] 
Move embedded test to after setting compiler options to fix a build issue with quotes.

9 years agoiSNS is option 83, not 84.
Roy Marples [Tue, 12 Apr 2016 14:15:11 +0000 (14:15 +0000)] 
iSNS is option 83, not 84.

9 years agoAdd support for int8 and uint8 data types.
Roy Marples [Mon, 11 Apr 2016 16:25:54 +0000 (16:25 +0000)] 
Add support for int8 and uint8 data types.
Rename SINT* to INT* to match C semantics.

9 years agoFix prior definition.
Roy Marples [Mon, 11 Apr 2016 15:40:16 +0000 (15:40 +0000)] 
Fix prior definition.

9 years agoSupport iSNS, RFC4174.
Roy Marples [Mon, 11 Apr 2016 12:53:53 +0000 (12:53 +0000)] 
Support iSNS, RFC4174.
While here, don't crash if we enter the wrong keyword in dhcpcd-definitions.

9 years agoSync pidfile.c from NetBSD.
Roy Marples [Sun, 10 Apr 2016 20:15:36 +0000 (20:15 +0000)] 
Sync pidfile.c from NetBSD.

9 years agoMake fork process clearer.
Roy Marples [Sun, 10 Apr 2016 18:46:12 +0000 (18:46 +0000)] 
Make fork process clearer.

9 years agoRelease dhcpcd-6.10.2 v6.10.2
Roy Marples [Fri, 8 Apr 2016 20:54:04 +0000 (20:54 +0000)] 
Release dhcpcd-6.10.2

9 years agoFix compile warnings.
Roy Marples [Fri, 8 Apr 2016 20:50:58 +0000 (20:50 +0000)] 
Fix compile warnings.

9 years agoDon't dick with IPv4LL route reactions on BSD.
Roy Marples [Fri, 8 Apr 2016 20:35:09 +0000 (20:35 +0000)] 
Don't dick with IPv4LL route reactions on BSD.

9 years agoIf a normal default route is added, delete our IPv4LL default route.
Roy Marples [Fri, 8 Apr 2016 20:02:41 +0000 (20:02 +0000)] 
If a normal default route is added, delete our IPv4LL default route.
If a normal defaulr route is deleted, and no other exists, add our IPv4LL
default route.

Fixes [bd6daf1d59].

9 years agoFix changing routes on FreeBSD.
Roy Marples [Fri, 8 Apr 2016 10:49:21 +0000 (10:49 +0000)] 
Fix changing routes on FreeBSD.

9 years agoLog RA's only when it's a new router unless debugging is enabled.
Roy Marples [Fri, 8 Apr 2016 09:38:53 +0000 (09:38 +0000)] 
Log RA's only when it's a new router unless debugging is enabled.
This is because some routers decrease the preferred and valid times
in accordance to their own prefixes and we don't want to needlessly spam
the log.

Fixed [01f7cbd3b1].

9 years agoFix BSD for making routes.
Roy Marples [Fri, 8 Apr 2016 08:29:52 +0000 (08:29 +0000)] 
Fix BSD for making routes.

9 years agoConstify handlert
Roy Marples [Fri, 8 Apr 2016 06:54:43 +0000 (06:54 +0000)] 
Constify handlert

9 years agoFix a bogus static analyzer bug.
Roy Marples [Thu, 7 Apr 2016 20:45:20 +0000 (20:45 +0000)] 
Fix a bogus static analyzer bug.

9 years agoFix compile on BSD.
Roy Marples [Thu, 7 Apr 2016 20:41:51 +0000 (20:41 +0000)] 
Fix compile on BSD.

9 years agoLinux netlink nlmsg_pid is not process id - only the first socket opened
Roy Marples [Thu, 7 Apr 2016 20:35:57 +0000 (20:35 +0000)] 
Linux netlink nlmsg_pid is not process id - only the first socket opened
has that. So after opening the link socket, open a persistent route socket
and record the nlmsg_pid the kernel creates which is guaranteed unique
and won't clash with a process id which can then be ignored by testing it
directly and not that it's some large number.

9 years agoDon't do ipv6 routes if ipv6 is disabled.
Roy Marples [Wed, 6 Apr 2016 20:53:54 +0000 (20:53 +0000)] 
Don't do ipv6 routes if ipv6 is disabled.

9 years agoFix function name
Roy Marples [Wed, 6 Apr 2016 20:53:26 +0000 (20:53 +0000)] 
Fix function name

9 years agoDescope dest and gateway when copying routes. Set RTA_IFP and RTA_IFA when changing...
Roy Marples [Wed, 6 Apr 2016 18:49:13 +0000 (18:49 +0000)] 
Descope dest and gateway when copying routes. Set RTA_IFP and RTA_IFA when changing routes.

9 years agoBring FORCERENEW message in line with others (drop the DHCP_).
Roy Marples [Tue, 5 Apr 2016 13:43:56 +0000 (13:43 +0000)] 
Bring FORCERENEW message in line with others (drop the DHCP_).

9 years agoFix spelling of RECONFIGURE6, fixes [c6f1927f1a].
Roy Marples [Tue, 5 Apr 2016 13:34:47 +0000 (13:34 +0000)] 
Fix spelling of RECONFIGURE6, fixes [c6f1927f1a].

9 years agoFix pidfile_lock compat on Linux.
Roy Marples [Fri, 1 Apr 2016 21:27:22 +0000 (21:27 +0000)] 
Fix pidfile_lock compat on Linux.

9 years agoRemove pidfile handling from dhcpcd and use pidfile_lock(3) from libutil
Roy Marples [Fri, 1 Apr 2016 21:14:28 +0000 (21:14 +0000)] 
Remove pidfile handling from dhcpcd and use pidfile_lock(3) from libutil
instead.
pidfile_lock(3) should be found in NetBSD 8.
Provide a compat shim, from an earlier implementation I wrote still based
around flock if not available on host OS.

9 years agoDescribe how hardware based arping profiles work.
Roy Marples [Wed, 30 Mar 2016 07:08:34 +0000 (07:08 +0000)] 
Describe how hardware based arping profiles work.

9 years agoWhite space police.
Roy Marples [Mon, 28 Mar 2016 20:08:43 +0000 (20:08 +0000)] 
White space police.

9 years agoDocument --with-poll
Roy Marples [Wed, 23 Mar 2016 22:18:00 +0000 (22:18 +0000)] 
Document --with-poll

9 years agoFix compile on Linux.
Roy Marples [Wed, 23 Mar 2016 22:03:16 +0000 (22:03 +0000)] 
Fix compile on Linux.

9 years agoMake eloop a tad easier to use.
Roy Marples [Thu, 17 Mar 2016 14:35:13 +0000 (14:35 +0000)] 
Make eloop a tad easier to use.

9 years agoFix dprintf, thanks to OBATA Akio.
Roy Marples [Wed, 16 Mar 2016 11:26:49 +0000 (11:26 +0000)] 
Fix dprintf, thanks to OBATA Akio.

9 years agoIt's possible to receive routing events for non existant interfaces, so abort gracefu...
Roy Marples [Sun, 13 Mar 2016 19:46:09 +0000 (19:46 +0000)] 
It's possible to receive routing events for non existant interfaces, so abort gracefully rather than asserting.

9 years agoSupport buggy FreeBSD rc system out of the box.
Roy Marples [Sat, 12 Mar 2016 10:52:41 +0000 (10:52 +0000)] 
Support buggy FreeBSD rc system out of the box.

9 years agoFix configure when >1 ld-elf.so.N
Roy Marples [Fri, 11 Mar 2016 20:46:54 +0000 (20:46 +0000)] 
Fix configure when >1 ld-elf.so.N

9 years agoFix configure again
Roy Marples [Fri, 11 Mar 2016 20:37:17 +0000 (20:37 +0000)] 
Fix configure again

9 years agoInitialise struct to pass configure on FreeBSD.
Roy Marples [Fri, 11 Mar 2016 20:29:20 +0000 (20:29 +0000)] 
Initialise struct to pass configure on FreeBSD.

9 years agoFix configure tests
Roy Marples [Fri, 11 Mar 2016 16:44:59 +0000 (16:44 +0000)] 
Fix configure tests

9 years agoUse -Wall -Werror when running configure tests.
Roy Marples [Fri, 11 Mar 2016 16:35:29 +0000 (16:35 +0000)] 
Use -Wall -Werror when running configure tests.

9 years agoFix compile on older platforms which lack O_CLOEXEC.
Roy Marples [Fri, 11 Mar 2016 13:44:42 +0000 (13:44 +0000)] 
Fix compile on older platforms which lack O_CLOEXEC.
Thanks to OBATA Akio.

9 years agoSupport RTF_CONNECTED, soon to be committed to NetBSD.
Roy Marples [Fri, 11 Mar 2016 12:11:47 +0000 (12:11 +0000)] 
Support RTF_CONNECTED, soon to be committed to NetBSD.

9 years agoCorrect help about for localstatedir and PREFIX.
Roy Marples [Thu, 3 Mar 2016 19:59:45 +0000 (19:59 +0000)] 
Correct help about for localstatedir and PREFIX.
Fixes [894a51e239].

9 years agoIf we fail to open kqueue/epoll, abort the loop.
Roy Marples [Sat, 27 Feb 2016 17:19:15 +0000 (17:19 +0000)] 
If we fail to open kqueue/epoll, abort the loop.

9 years agoNow we have a fd lookup table, we can elimiate the need to store
Roy Marples [Fri, 26 Feb 2016 21:22:30 +0000 (21:22 +0000)] 
Now we have a fd lookup table, we can elimiate the need to store
a backpointer to the poll structure in the event.

9 years agoUse a fd lookup table rather than checking each event in turn until we find
Roy Marples [Fri, 26 Feb 2016 21:16:43 +0000 (21:16 +0000)] 
Use a fd lookup table rather than checking each event in turn until we find
the fd.

9 years agoRoll our own reallocarray(3) function because that and the reallocarr(3) functions...
Roy Marples [Fri, 26 Feb 2016 19:45:29 +0000 (19:45 +0000)] 
Roll our own reallocarray(3) function because that and the reallocarr(3) functions aren't portable in eloop.

9 years agoThis comment no longer applies with kqueue(2) and epoll(7).
Roy Marples [Fri, 26 Feb 2016 16:10:36 +0000 (16:10 +0000)] 
This comment no longer applies with kqueue(2) and epoll(7).

9 years agoDescribe eloop better.
Roy Marples [Fri, 26 Feb 2016 16:08:19 +0000 (16:08 +0000)] 
Describe eloop better.
Use more full stops.

9 years agoAdd POLLOUT to the pselect wrapper.
Roy Marples [Fri, 26 Feb 2016 16:04:12 +0000 (16:04 +0000)] 
Add POLLOUT to the pselect wrapper.

9 years agoEnforce pltime < vltime for prefixes as well.
Roy Marples [Sat, 20 Feb 2016 02:35:10 +0000 (02:35 +0000)] 
Enforce pltime < vltime for prefixes as well.

9 years agoExlcude stale or delegated prefixes from timers.
Roy Marples [Sat, 20 Feb 2016 02:16:20 +0000 (02:16 +0000)] 
Exlcude stale or delegated prefixes from timers.

9 years agoEnforce correctness of vltime, pltime, T1 and T2.
Roy Marples [Fri, 19 Feb 2016 22:20:51 +0000 (22:20 +0000)] 
Enforce correctness of vltime, pltime, T1 and T2.
Warn about addresses expiring before T1.
If all addresses expire before T1, violate RFC 3315 22.4 and
present T1 and T2 are zero so dhcpcd will use sane defaults
based on the lowest vltime and pltime.

Fixes [004f2b78ed]

9 years agoSet fp to NULL after fclose() to avoid a potential secondary fclose() if the
Roy Marples [Tue, 16 Feb 2016 09:54:29 +0000 (09:54 +0000)] 
Set fp to NULL after fclose() to avoid a potential secondary fclose() if the
first call failed.
Fixes [a4c18d501a].

9 years agoWe need to log expiry time for the lease as each address has it's own notion.
Roy Marples [Tue, 16 Feb 2016 09:53:12 +0000 (09:53 +0000)] 
We need to log expiry time for the lease as each address has it's own notion.

9 years agoRemove ipv6ra_accept_nopublic and just accept it.
Roy Marples [Mon, 15 Feb 2016 21:27:59 +0000 (21:27 +0000)] 
Remove ipv6ra_accept_nopublic and just accept it.