diff --git a/NEWS b/NEWS index aecaa725..cc1deff8 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c index 59ae6cf0..ffb075d5 100644 --- a/proto/ospf/rt.c +++ b/proto/ospf/rt.c @@ -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)) { diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c index 13a0afd2..9c494f51 100644 --- a/proto/rpki/rpki.c +++ b/proto/rpki/rpki.c @@ -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. */ diff --git a/proto/static/config.Y b/proto/static/config.Y index ef5fb94d..87560100 100644 --- a/proto/static/config.Y +++ b/proto/static/config.Y @@ -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"); } ;