diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-11 14:03:17 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-03-11 14:03:17 +0100 |
commit | 6cd8093d3207e86d318953c3ebd4b9120078a742 (patch) | |
tree | 724e51495400799b28dfa2f08780fe11b03ec803 /ldpd/ldpe.c | |
parent | Merge pull request #5962 from donaldsharp/whichafisafi (diff) | |
download | frr-6cd8093d3207e86d318953c3ebd4b9120078a742.tar.xz frr-6cd8093d3207e86d318953c3ebd4b9120078a742.zip |
ldpd: During code inspection we are mixing data sizes
As I understand it ldpd was originally developed as a standalone
daemon for *BSD land. Then ported to FRR. FRR uses ifindex_t
as the base type for the ifindex. Mixing `unsigned short` and
`int` and `unsigned int` is going to lead to fun somewhere
along the way. Especially when we get to run on a system
with ifindex churn( I'm looking at you docker ).
Attempt to convert all of ldpd to think of the ifindex as a
`ifindex_t`.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ldpd/ldpe.c')
-rw-r--r-- | ldpd/ldpe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c index 82e52f5fe..b34a1ecdd 100644 --- a/ldpd/ldpe.c +++ b/ldpd/ldpe.c @@ -41,7 +41,7 @@ static int ldpe_dispatch_pfkey(struct thread *); #endif static void ldpe_setup_sockets(int, int, int, int); static void ldpe_close_sockets(int); -static void ldpe_iface_af_ctl(struct ctl_conn *, int, unsigned int); +static void ldpe_iface_af_ctl(struct ctl_conn *c, int af, ifindex_t ifidx); struct ldpd_conf *leconf; #ifdef __OpenBSD__ @@ -827,7 +827,7 @@ ldpe_stop_init_backoff(int af) } static void -ldpe_iface_af_ctl(struct ctl_conn *c, int af, unsigned int idx) +ldpe_iface_af_ctl(struct ctl_conn *c, int af, ifindex_t idx) { struct iface *iface; struct iface_af *ia; @@ -847,7 +847,7 @@ ldpe_iface_af_ctl(struct ctl_conn *c, int af, unsigned int idx) } void -ldpe_iface_ctl(struct ctl_conn *c, unsigned int idx) +ldpe_iface_ctl(struct ctl_conn *c, ifindex_t idx) { ldpe_iface_af_ctl(c, AF_INET, idx); ldpe_iface_af_ctl(c, AF_INET6, idx); |