netinet6: keep negotiated IPv6CP IFID unchanged for link-local address
When sppp/PPPoE installs a peer-suggested IPv6CP interface identifier,
in6_ifattach_linklocal() forced EUI64 G/U bit adjustments on the
provided IFID. This unconditionally set the universal bit, rewriting a
valid negotiated IFID like ::1 into ::200:0:0:1, yielding
fe80::200:0:0:1 instead of fe80::1.
RFC 5072 Section 5 specifies that the PPP link-local address is formed
using the negotiated Interface Identifier as-is. Skip EUI64 bit
modification on point-to-point interfaces. Non-P2P callers retain
existing behaviour, while callers passing NULL continue using
in6_get_ifid().
Reported by Martin Crossley <admin AT crossleys DOT biz>.
OK stsp@
Fix possible exit race in the parser
Call pthread_cond_broadcast() on exit with its mutex held to ensure
that the receiving threads are all either parked or running and then
checking quit before calling pthread_cond_wait().
Also once woken recheck the value of quit and exit the main loop early.
OK tb@
DNS names are not proper C strings, they can contain NUL octets.
If we want to use string functions (e.g. for comparison) we first need
to convert them.
with dgl some time ago
OK dlg
pmtiles uses gobs of RAM when working with larger zoom levels, add a quick
MESSAGE warning about this (it's better to find out before you download
100GB+).
Rework the IdleHoldTimer and how fast reconnects are implemented.
On first error bgpd should allow a fast reconnect - this is especially
helpful for passive sessions. The way this was implemented was error
prone with a special case in session_accept().
Adjust the FSM so that on the first IDLE transistion the session uses
a IdleHoldTime of 0 sec but then increased to INTERVAL_IDLE_HOLD_INITIAL.
At the same time the outgoing connection is delatyed via ConnectRetryTimer.
Doing this moves the session quickly into active state and allows new
connections in but delays the reconnect like before.
Additionally the STATE_ACTIVE / EVNT_START FSM case is adjusted to initiate
a connect immediatly. This allows a 'bgpctl nei X up' to work also for
sessions in ACTIVE state. Also passive sessions will initiate a connection
in this case, which is a new behaviour.
OK tb@
Use peer_dump_done() in the EXPORT_NONE and EXPORT_DEFAULT_ROUTE cases of
peer_dump().
peer_dump_done() calls peer_blast_done() and it issues the End-Of-RIB
marker. This unifies all the peer_dump finalizers to use peer_dump_done().
OK tb@
Switch a few uint32_t to unsigned int where it makes sense.
Instead of mixing uint32_t with unsigned long long use unsigned int for
those. In most cases those are simple counts that can't get too big.
The same is the case for max_prefix and max_out_prefix. There is no good
reason to use uint32_t there.
OK tb@