0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Merge commit '13c6cf8a7430a6b133e46525256eb5554b3f0a2b' into thread-next

This commit is contained in:
Maria Matejka 2024-01-28 23:09:47 +01:00
commit d615633437
6 changed files with 27 additions and 26 deletions

View File

@ -143,7 +143,7 @@ bfd_merge_options(const struct bfd_iface_config *cf, const struct bfd_options *o
.min_tx_int = opts->min_tx_int ?: cf->min_tx_int,
.idle_tx_int = opts->idle_tx_int ?: cf->idle_tx_int,
.multiplier = opts->multiplier ?: cf->multiplier,
.passive = opts->passive_set ? opts->passive : cf->passive
.passive = opts->passive_set ? opts->passive : cf->passive,
};
}
@ -238,7 +238,7 @@ bfd_session_control_tx_timer(struct bfd_session *s, int reset)
return;
stop:
stop:
tm_stop(s->tx_timer);
s->last_tx = 0;
}
@ -553,7 +553,7 @@ static struct bfd_iface_config bfd_default_iface = {
.min_rx_int = BFD_DEFAULT_MIN_RX_INT,
.min_tx_int = BFD_DEFAULT_MIN_TX_INT,
.idle_tx_int = BFD_DEFAULT_IDLE_TX_INT,
.multiplier = BFD_DEFAULT_MULTIPLIER
.multiplier = BFD_DEFAULT_MULTIPLIER,
};
static inline struct bfd_iface_config *
@ -903,7 +903,7 @@ static struct resclass bfd_request_class = {
bfd_request_free,
bfd_request_dump,
NULL,
NULL
NULL,
};

View File

@ -387,7 +387,7 @@ bfd_rx_hook(sock *sk, uint len)
u32 old_tx_int = s->des_min_tx_int;
u32 old_rx_int = s->rem_min_rx_int;
s->rem_id= ntohl(pkt->snd_id);
s->rem_id = ntohl(pkt->snd_id);
s->rem_state = bfd_pkt_get_state(pkt);
s->rem_diag = bfd_pkt_get_diag(pkt);
s->rem_demand_mode = pkt->flags & BFD_FLAG_DEMAND;
@ -437,7 +437,7 @@ bfd_open_rx_sk(struct bfd_proto *p, int multihop, int af)
return sk;
err:
err:
sk_log_error(sk, p->p.name);
sk_close(sk);
return NULL;
@ -468,7 +468,7 @@ bfd_open_rx_sk_bound(struct bfd_proto *p, ip_addr local, struct iface *ifa)
return sk;
err:
err:
sk_log_error(sk, p->p.name);
sk_close(sk);
return NULL;
@ -499,7 +499,7 @@ bfd_open_tx_sk(struct bfd_proto *p, ip_addr local, struct iface *ifa)
return sk;
err:
err:
sk_log_error(sk, p->p.name);
sk_close(sk);
return NULL;

View File

@ -1274,7 +1274,7 @@ static void
bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing connection */
{
struct bgp_conn *conn = &p->outgoing_conn;
int hops = p->cf->multihop ? : 1;
int hops = p->cf->multihop ?: 1;
DBG("BGP: Connecting\n");
sock *s = sk_new(p->p.pool);
@ -1426,7 +1426,7 @@ bgp_incoming_connection(sock *sk, uint dummy UNUSED)
goto leave;
}
hops = p->cf->multihop ? : 1;
hops = p->cf->multihop ?: 1;
if (sk_set_ttl(sk, p->cf->ttl_security ? 255 : hops) < 0)
goto err;
@ -2453,7 +2453,7 @@ bgp_reconfigure(struct proto *P, struct proto_config *CF)
return 1;
}
#define TABLE(cf, NAME) ((cf)->NAME ? (cf)->NAME->table : NULL )
#define TABLE(cf, NAME) ((cf)->NAME ? (cf)->NAME->table : NULL)
static int
bgp_channel_reconfigure(struct channel *C, struct channel_config *CC, int *import_changed, int *export_changed)
@ -2586,10 +2586,10 @@ bgp_store_error(struct bgp_proto *p, struct bgp_conn *c, u8 class, u32 code)
}
static char *bgp_state_names[] = { "Idle", "Connect", "Active", "OpenSent", "OpenConfirm", "Established", "Close" };
static char *bgp_err_classes[] = { "", "Error: ", "Socket: ", "Received: ", "BGP Error: ", "Automatic shutdown: ", ""};
static char *bgp_misc_errors[] = { "", "Neighbor lost", "Invalid next hop", "Kernel MD5 auth failed", "No listening socket", "Link down", "BFD session down", "Graceful restart"};
static char *bgp_auto_errors[] = { "", "Route limit exceeded"};
static char *bgp_gr_states[] = { "None", "Regular", "Long-lived"};
static char *bgp_err_classes[] = { "", "Error: ", "Socket: ", "Received: ", "BGP Error: ", "Automatic shutdown: ", "" };
static char *bgp_misc_errors[] = { "", "Neighbor lost", "Invalid next hop", "Kernel MD5 auth failed", "No listening socket", "Link down", "BFD session down", "Graceful restart" };
static char *bgp_auto_errors[] = { "", "Route limit exceeded" };
static char *bgp_gr_states[] = { "None", "Regular", "Long-lived" };
static const char *
bgp_last_errmsg(struct bgp_proto *p)

View File

@ -16,8 +16,8 @@ static inline void lsa_hton_hdr(struct ospf_lsa_header *h, struct ospf_lsa_heade
static inline void lsa_ntoh_hdr(struct ospf_lsa_header *n, struct ospf_lsa_header *h) { *h = *n; };
static inline void lsa_hton_body(void *h, void *n, u16 len) { ASSERT(h != n); memcpy(n, h, len); };
static inline void lsa_ntoh_body(void *n, void *h, u16 len) { ASSERT(n != h); memcpy(h, n, len); };
static inline void lsa_hton_body1(void *h, u16 len) { };
static inline void lsa_ntoh_body1(void *n, u16 len) { };
static inline void lsa_hton_body1(void *h UNUSED, u16 len UNUSED) { };
static inline void lsa_ntoh_body1(void *n UNUSED, u16 len UNUSED) { };
#else
void lsa_hton_hdr(struct ospf_lsa_header *h, struct ospf_lsa_header *n);
void lsa_ntoh_hdr(struct ospf_lsa_header *n, struct ospf_lsa_header *h);

View File

@ -77,6 +77,7 @@
*/
#include <stdlib.h>
#include "rip.h"
#include "lib/macro.h"