0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Merge commit '0b684a43bd7ce4a32c9cd7754b88286bcd1815bb' into thread-next

This commit is contained in:
Ondrej Zajicek 2024-04-01 18:24:10 +02:00
commit 5d5c431a3c
4 changed files with 18 additions and 13 deletions

6
NEWS
View File

@ -30,6 +30,12 @@ Version 3.0-alpha0 (2022-02-07)
o Bugfixes and improvements as they came along
Version 2.15.1 (2024-03-22)
o OSPF: Fix regression in handling PtP links
o RPKI: Handle connection resets properly
o Static: Reject invalid combination of options
o Fix builds with limited set of protocols
Version 2.15 (2024-03-10)
o BGP: Send hold timer
o BGP: New options to specify required BGP capabilities

View File

@ -1776,12 +1776,7 @@ calc_next_hop(struct ospf_area *oa, struct top_hash_entry *en,
if (ifa->type == OSPF_IT_VLINK)
return new_nexthop(p, IPA_NONE, NULL, 0);
/*
* The type of the ospf_iface is PtP and the iface is a physical PtP link,
* so we can simply use the iface, and skip further resolving.
*/
if (ifa->type == OSPF_IT_PTP && !(ifa->iface->flags & IF_MULTIACCESS))
return new_nexthop(p, IPA_NONE, ifa->iface, ifa->ecmp_weight);
/* FIXME: On physical PtP links we may skip next-hop altogether */
if (ospf_is_v2(p) || ospf_is_ip6(p))
{

View File

@ -318,6 +318,7 @@ rpki_cache_change_state(struct rpki_cache *cache, const enum rpki_cache_state ne
rpki_close_connection(cache);
rpki_schedule_next_retry(cache);
rpki_stop_refresh_timer_event(cache);
cache->request_session_id = 1;
break;
case RPKI_CS_FAST_RECONNECT:
@ -396,12 +397,11 @@ rpki_stop_all_timers(struct rpki_cache *cache)
}
static int
rpki_do_we_recv_prefix_pdu_in_last_seconds(struct rpki_cache *cache)
rpki_sync_is_stuck(struct rpki_cache *cache)
{
if (!cache->last_rx_prefix)
return 0;
return ((current_time() - cache->last_rx_prefix) <= 2 S);
return !sk_rx_ready(cache->tr_sock->sk) && (
!cache->last_rx_prefix || (current_time() - cache->last_rx_prefix > 10 S)
);
}
/**
@ -436,7 +436,7 @@ rpki_refresh_hook(timer *tm)
/* We sent Serial/Reset Query in last refresh hook call
* and we got Cache Response but didn't get End-Of-Data yet.
* It could be a trouble with network or only too long synchronization. */
if (!rpki_do_we_recv_prefix_pdu_in_last_seconds(cache))
if (rpki_sync_is_stuck(cache))
{
CACHE_TRACE(D_EVENTS, cache, "Sync takes more time than refresh interval %us, resetting connection", cache->refresh_interval);
rpki_cache_change_state(cache, RPKI_CS_ERROR_TRANSPORT);
@ -480,7 +480,7 @@ rpki_retry_hook(timer *tm)
case RPKI_CS_CONNECTING:
case RPKI_CS_SYNC_START:
case RPKI_CS_SYNC_RUNNING:
if (!rpki_do_we_recv_prefix_pdu_in_last_seconds(cache))
if (rpki_sync_is_stuck(cache))
{
/* We tried to establish a connection in last retry hook call and haven't done
* yet. It looks like troubles with network. We are aggressive here. */

View File

@ -95,6 +95,8 @@ stat_nexthop:
}
| stat_nexthop ONLINK bool {
this_snh->onlink = $3;
if (this_snh->use_bfd && this_snh->onlink)
cf_error("Options 'bfd' and 'onlink' cannot be combined");
}
| stat_nexthop WEIGHT expr {
this_snh->weight = $3 - 1;
@ -102,6 +104,8 @@ stat_nexthop:
}
| stat_nexthop BFD bool {
this_snh->use_bfd = $3; cf_check_bfd($3);
if (this_snh->use_bfd && this_snh->onlink)
cf_error("Options 'bfd' and 'onlink' cannot be combined");
}
;