diff options
| -rw-r--r-- | alpine/APKBUILD.in | 2 | ||||
| -rw-r--r-- | docker/alpine/Dockerfile | 29 | ||||
| -rwxr-xr-x | docker/alpine/libyang/APKBUILD | 10 | ||||
| -rw-r--r-- | ldpd/adjacency.c | 4 | ||||
| -rw-r--r-- | pimd/pim_zebra.h | 1 | ||||
| -rw-r--r-- | zebra/rt_netlink.c | 8 | ||||
| -rw-r--r-- | zebra/zebra_mpls.c | 11 |
7 files changed, 35 insertions, 30 deletions
diff --git a/alpine/APKBUILD.in b/alpine/APKBUILD.in index ccae9bfd0b..51986de2dd 100644 --- a/alpine/APKBUILD.in +++ b/alpine/APKBUILD.in @@ -18,7 +18,7 @@ makedepends="ncurses-dev net-snmp-dev gawk texinfo perl ncurses-libs ncurses-terminfo ncurses-terminfo-base patch pax-utils pcre perl pkgconf python3 python3-dev readline readline-dev sqlite-libs squashfs-tools sudo tar texinfo xorriso xz-libs py-pip rtrlib rtrlib-dev - py3-sphinx elfutils elfutils-dev" + py3-sphinx elfutils elfutils-dev libyang-dev" checkdepends="pytest py-setuptools" install="$pkgname.pre-install $pkgname.pre-deinstall $pkgname.post-deinstall" subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg" diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index fa4b9859b9..187b528524 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -15,11 +15,12 @@ RUN adduser -D -G abuild builder && su builder -c 'abuild-keygen -a -n' # This stage builds a libyang APK from source FROM alpine-builder as libyang-builder RUN mkdir -p /libyang && chown -R builder /pkgs /libyang -COPY docker/alpine/libyang/ /libyang -USER builder -RUN cd /libyang \ - && abuild checksum \ - && abuild -r -P /pkgs/apk +# -- Not currently needed - libyang currently available in Alpine upstream +# COPY docker/alpine/libyang/ /libyang +# USER builder +# RUN cd /libyang \ +# && abuild checksum \ +# && abuild -r -P /pkgs/apk # This stage builds a dist tarball from the source FROM alpine:3.15 as source-builder @@ -37,10 +38,11 @@ RUN source /src/alpine/APKBUILD.in \ && pip install pytest RUN mkdir -p /pkgs/apk -COPY --from=libyang-builder /pkgs/apk/ /pkgs/apk/ -RUN apk add \ - --no-cache \ - --allow-untrusted /pkgs/apk/*/*.apk +# -- Not needed while libyang is not built +# COPY --from=libyang-builder /pkgs/apk/ /pkgs/apk/ +# RUN apk add \ +# --no-cache \ +# --allow-untrusted /pkgs/apk/*/*.apk \ COPY . /src ARG PKGVER @@ -53,12 +55,13 @@ RUN cd /src \ # This stage builds an APK from the dist tarball FROM alpine-builder as frr-apk-builder -COPY --from=libyang-builder /pkgs/apk/ /pkgs/apk/ +# -- Not needed while libyang is not built +# COPY --from=libyang-builder /pkgs/apk/ /pkgs/apk/ +# RUN apk add \ +# --no-cache \ +# --allow-untrusted /pkgs/apk/*/*.apk COPY --from=source-builder /src/frr-*.tar.gz /src/alpine/* /dist/ RUN find /pkgs/apk -type f -name APKINDEX.tar.gz -delete -RUN apk add \ - --no-cache \ - --allow-untrusted /pkgs/apk/*/*.apk RUN chown -R builder /dist /pkgs USER builder RUN cd /dist \ diff --git a/docker/alpine/libyang/APKBUILD b/docker/alpine/libyang/APKBUILD index 9fa20bf4d1..aa792e7f0b 100755 --- a/docker/alpine/libyang/APKBUILD +++ b/docker/alpine/libyang/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Christian Franke <nobody@nowhere.ws> pkgname=libyang -pkgver=2.0.7 +pkgver=2.0.194 pkgrel=0 pkgdesc="YANG data modelling language parser and toolkit" url="https://github.com/CESNET/libyang" @@ -10,9 +10,7 @@ license="BSD-3-Clause-Clear" makedepends="bison cmake cmocka-dev flex pcre2-dev" checkdepends="expect grep shunit2" subpackages="$pkgname-dev $pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/CESNET/libyang/archive/v$pkgver.tar.gz - 10-remove-non-standard-headers.patch - 11-utest-dont-parse-dlerror.patch" +source="$pkgname-$pkgver.tar.gz::https://github.com/CESNET/libyang/archive/v$pkgver.tar.gz" # secfixes: # 1.0.215-r1: @@ -40,7 +38,3 @@ build() { package() { make -C build DESTDIR="$pkgdir" install } - -sha512sums="edb1d8d372b25ed820fa312e0dc96d4af7c8cd5ddeb785964de73f64774062ea7a5586bb27e2039ad24189d4a2ba04268921ca86e82423fc48647d1d10a2a0a7 libyang-2.0.7.tar.gz -385008c715e6b0dc9e8f33c9cb550b3af7ee16f056f35d09a4ba01b9e00ddb88940915f93fc608fedd30b4f9a6a1503df414ae0be64b1263681b0ee18e6f4db8 10-remove-non-standard-headers.patch -b16881d301a6aec68fbe6bfb7ba53a8fcdb4b9eead3b03573e0e2a4a8c3c3d6962db623be14d29c023b5a7ad0f685da1f6033dd9985f7a2914ad2f4da07e60cb 11-utest-dont-parse-dlerror.patch" diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c index bbc8a277a6..7eb5663492 100644 --- a/ldpd/adjacency.c +++ b/ldpd/adjacency.c @@ -386,7 +386,9 @@ adj_to_ctl(struct adj *adj) } actl.holdtime = adj->holdtime; actl.holdtime_remaining = - thread_timer_remain_second(adj->inactivity_timer); + thread_is_scheduled(adj->inactivity_timer) + ? thread_timer_remain_second(adj->inactivity_timer) + : 0; actl.trans_addr = adj->trans_addr; actl.ds_tlv = adj->ds_tlv; diff --git a/pimd/pim_zebra.h b/pimd/pim_zebra.h index 5879cdefb0..6710f19995 100644 --- a/pimd/pim_zebra.h +++ b/pimd/pim_zebra.h @@ -28,7 +28,6 @@ void pim_zebra_init(void); void pim_zebra_zclient_update(struct vty *vty); -void pim_scan_individual_oil(struct channel_oil *c_oil, int in_vif_index); void pim_scan_oil(struct pim_instance *pim_matcher); void pim_forward_start(struct pim_ifchannel *ch); diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 1d9b59cf73..0eab1fa850 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -437,10 +437,10 @@ static enum seg6local_action_t parse_encap_seg6local(struct rtattr *tb, struct seg6local_context *ctx) { - struct rtattr *tb_encap[256] = {}; + struct rtattr *tb_encap[SEG6_LOCAL_MAX + 1] = {}; enum seg6local_action_t act = ZEBRA_SEG6_LOCAL_ACTION_UNSPEC; - netlink_parse_rtattr_nested(tb_encap, 256, tb); + netlink_parse_rtattr_nested(tb_encap, SEG6_LOCAL_MAX, tb); if (tb_encap[SEG6_LOCAL_ACTION]) act = *(uint32_t *)RTA_DATA(tb_encap[SEG6_LOCAL_ACTION]); @@ -465,11 +465,11 @@ parse_encap_seg6local(struct rtattr *tb, static int parse_encap_seg6(struct rtattr *tb, struct in6_addr *segs) { - struct rtattr *tb_encap[256] = {}; + struct rtattr *tb_encap[SEG6_IPTUNNEL_MAX + 1] = {}; struct seg6_iptunnel_encap *ipt = NULL; struct in6_addr *segments = NULL; - netlink_parse_rtattr_nested(tb_encap, 256, tb); + netlink_parse_rtattr_nested(tb_encap, SEG6_IPTUNNEL_MAX, tb); /* * TODO: It's not support multiple SID list. diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 772e30833c..8fe5dd9d27 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -4005,6 +4005,13 @@ void zebra_mpls_client_cleanup_vrf_label(uint8_t proto) } } +static void lsp_table_free(void *p) +{ + struct zebra_lsp *lsp = p; + + XFREE(MTYPE_LSP, lsp); +} + /* * Called upon process exiting, need to delete LSP forwarding * entries from the kernel. @@ -4013,9 +4020,9 @@ void zebra_mpls_client_cleanup_vrf_label(uint8_t proto) void zebra_mpls_close_tables(struct zebra_vrf *zvrf) { hash_iterate(zvrf->lsp_table, lsp_uninstall_from_kernel, NULL); - hash_clean(zvrf->lsp_table, NULL); + hash_clean(zvrf->lsp_table, lsp_table_free); hash_free(zvrf->lsp_table); - hash_clean(zvrf->slsp_table, NULL); + hash_clean(zvrf->slsp_table, lsp_table_free); hash_free(zvrf->slsp_table); route_table_finish(zvrf->fec_table[AFI_IP]); route_table_finish(zvrf->fec_table[AFI_IP6]); |
