summaryrefslogtreecommitdiffstats
path: root/src/ipv6nd.c
Commit message (Collapse)AuthorAge
* eloop: Make the API more like native poll/kqueue/epollRoy Marples2021-02-02
| | | | | | | | | Just have the one callback, but return an abstracted event mask to work out if we can read/write have something else. Log diagnostics if the event mask is unexpected. While here add more logging if we fail to register an event to monitor.
* A belated welcome to 2021Roy Marples2021-01-31
|
* Linux: Support wireless IP roamingRoy Marples2020-12-12
| | | | | | | | | | | | | | This is achieved by checking that the interface is wireless, IFF_UP and IFF_LOWER_UP are present, but IFF_RUNNING is missing. This gives exactly the same support as modern NetBSD when carrier loss is detected, but without the address verifications when the carrier comes back as that needs to be handled in the kernel. While IP setup is maintained, other configuration data is discarded. Note that this should be improved in the future. Thanks to Boris Krasnovskiy <borkra@gmail.com> for helping with this.
* Add --noconfigure optionRoy Marples2020-11-04
| | | | | With this set dhcpcd will not configure anything on the host. The expectation is that a 3rd party script will instead.
* dhcpcd: Simplify the link handling even moreRoy Marples2020-10-07
| | | | | | | Move the IS_LINK_UP macro to if_is_link_up function to reduce binary size. Rather than DHCPCD_LINK option controlling the carrier state, use it in if_is_link_up to determine the outcome.
* dhcpcd: Simplify carrier handling more by using IS_LINK_UP macroRoy Marples2020-10-06
| | | | | | Removes the need for the LINK_DOWN_IFFUP state. While here, remove the check for IFF_RUNNING when LINK_UNKNOWN because that is OS specific.
* Clean up some warnings.Sascha Wildner2020-09-24
|
* Linux: IP6 forwaring only applies to "all" interfaceRoy Marples2020-08-03
| | | | | Per interface forwarding is apparently only for setting things like IsRouter in NA messages.
* inet6: No flags on the prefix means the prefix is via the routerRoy Marples2020-06-17
| | | | Fixes a minor regression from prior.
* inet6: Report RA Proxy flag if setRoy Marples2020-06-16
|
* inet6: Add support for reporting Mobile IPv6 RA'sRoy Marples2020-06-15
| | | | | This is RFC6275. dhcpcd is not a client suitable for this, but it will at least decode the information properly.
* minor cleanupRoy Marples2020-06-10
|
* RA: Abort if no stateRoy Marples2020-06-06
| | | | | We might have received data for an interface before its been initialised.
* Solaris: Fix sending RS probesRoy Marples2020-05-29
|
* Solaris: Fix compileRoy Marples2020-05-29
| | | | But if_init is failing? Odd as this has not changed.
* privsep: Allow Linux to work without needing any mountsRoy Marples2020-05-24
|
* privsep: Enable Capsicum for all processes.Roy Marples2020-05-19
| | | | | | | | | | | | | | | | | Except for the priviledged process. This is quite an in-depth change: * ARP is now one process per address * BPF flags are now returned via privsep * BPF write filters are locked when supported * The root process sends to the network The last step is done by opening RAW sockets and then sending a UDP header (where applicable) to avoid binding to an address which is already in use by the reader sockets. This is slightly wasteful for OS's without sandboxing but does have the very nice side effect of not needing a source address to unicast DHCPs replies from which makes the code smaller.
* privsep: Implement pledge(2) support as found on OpenBSDRoy Marples2020-05-10
|
* DHCP: Use correct buffer for receiving UDPRoy Marples2020-05-05
| | | | | | Big wup! While here, ensure buffer is aligned to the structure we want to read.
* privsep: Add --chroot configurableRoy Marples2020-04-30
| | | | | Overrides the directory to chroot to away from the privilege separation users home directory.
* inet6: Set default ND timers before a RA arrives after preservationRoy Marples2020-04-29
| | | | | | | | Other OS will just remove the RA's on carrier down and thus set default values, but not so on NetBSD. As such as need to set default values just before settings any values from the incoming RA. This allows us to change networks sensibly.
* inet6: Expire ND on the second, not after itRoy Marples2020-04-29
| | | | Otherwise the timing is slightly confused.
* inet6: Apply the best RA which is still valid.Roy Marples2020-04-29
| | | | If there is no such RA, then apply some defaults.
* Align more CMSG foo.Roy Marples2020-04-26
|
* DHCP6: Implement DECLINE support for duplicated addressesRoy Marples2020-04-26
| | | | | | This is the final piece of DHCP6 to implement! Part of this change drops the use of the IPV6_AF_DUPLICATED flag and we just use IN6_IFF_DUPLICATED now.
* align CMSG bufferRoy Marples2020-04-21
|
* inet6: Add 'temporary' directive to the slaac optionRoy Marples2020-04-19
| | | | | | | | This instructs dhcpcd to create a temporary address for each address generated from a RA. As such, dhcpcd no longer looks at the kernel option for it as the functionality is being removed from some or never existed in the first place.
* inet6: Only log RA's when they are from a new serverRoy Marples2020-04-17
| | | | | | | We cannot log them normally as there are implementations which vary the expiry times based on their own times so each message is different. As such, we only log from new servers or coming back from expiration.
* Linux: Note router preference when adding routesRoy Marples2020-04-09
| | | | This appears to just be cosmetic.
* Note that setting pltime to zero for stale addresses isn't RFC compliantRoy Marples2020-04-01
| | | | | But also note we need to do this to ensure the kernel tries to use better addresses.
* ND: Improve stale detection for >1 routerRoy Marples2020-04-01
|
* ND: Check matching iface to make stale and add commentaryRoy Marples2020-04-01
|
* ND: If a secondary router adds the same prefix, use it's addressRoy Marples2020-03-31
| | | | | With slaac private, it will generate a new address which would be wrong.
* ND: Only deprecate prefixes when all staleRoy Marples2020-03-31
|
* script: Start RA addresses from 1, not 0.Roy Marples2020-03-28
|
* RA: Prefer older routers at the preferenceRoy Marples2020-03-11
|
* IPv6ND: Mark stale addresses/prefixes with a pltime of zero.Roy Marples2020-03-10
| | | | This mirrors DHCPv6 behaviour.
* IPv6ND: ap -> ia rototillRoy Marples2020-03-10
|
* Be pedantic and move syslog.h into the right placeRoy Marples2020-02-11
|
* logerr: Use macros to call log functionsSergey Nikiforov2020-02-11
| | | | | | This allows downstream implementions to inject their own data into the log message and/or supply new logging targets whilst preserving macros such as __FILE__ and __LINE__.
* inet6: Swap between DISCOVER and INFORM betterRoy Marples2020-02-06
| | | | | Most of the time this will be dictated by the RA, but let our config decide as well.
* inet6: Ensure expired routers are cleared after a carrier lossRoy Marples2020-02-06
| | | | | | | | | | When we lose carrier, mark all RAs as willexpire and add the timeout to expire to it's own queue. On receipt of a matching RA, clear the willexpire flag. When the above timeout occours, set doexpire on all RA's with withexpire and then call the general expirera function. This is needed because expirera can be called at any point.
* eloop: define eloop queue numbers in common.hRoy Marples2020-02-06
| | | | Allows for easier maintainance.
* inet6: fix forced RA expiration for a given interfaceRoy Marples2020-01-21
|
* inet6: Check if we can try a new address on DAD failure.Roy Marples2020-01-17
| | | | Not all prefixes are autoconfable.
* inet6: Log expiration of a prefix if autoconf is not setRoy Marples2020-01-17
| | | | Rather than the address. Otherwise it looks wierd.
* inet6: Temporary addresses only work if prefix + ifidlen == 128Roy Marples2020-01-17
| | | | Cater for various prefix lengths when using temporay addresses.
* inet6: Use milliseconds rather than timespec for calcuating delaysRoy Marples2020-01-04
|
* inet6: Don't compare router dates when sortingRoy Marples2020-01-07
| | | | Newest routers are added at the end, so we prefer newest anyway.
* eloop: reduce timers rather than calculating expiryRoy Marples2020-01-07
| | | | | | | | | | | | | | This saves the need to store a created date per timer, we just need to know when the timers were last changed which we can store in the eloop. This makes it easier to make the actual timeout for polling. While here, add the eloop_timespec_diff function to workout the elapsed time from usp to tsp even when time has wrapped on one or both times. This works if time wraps on the maximal size time_t allows AND we know that tsp is always newer than usp.