diff -Nru bird2-2.0.12/debian/changelog bird2-2.0.12/debian/changelog --- bird2-2.0.12/debian/changelog 2023-02-20 17:14:15.000000000 +0000 +++ bird2-2.0.12/debian/changelog 2023-04-26 15:33:46.000000000 +0000 @@ -1,3 +1,19 @@ +bird2 (2.0.12-7) unstable; urgency=medium + + [ Miao Wang ] + * Fix for arm64 cross build + + [ Jakub Ružička ] + * Add autopkgtest by upstream dev + + -- Jakub Ružička Wed, 26 Apr 2023 17:33:46 +0200 + +bird2 (2.0.12-6) unstable; urgency=medium + + * Add upstream patch to fix bgp_med handling + + -- Jakub Ružička Mon, 17 Apr 2023 15:18:52 +0200 + bird2 (2.0.12-5) unstable; urgency=medium * Add upstream patch to fix early free in config diff -Nru bird2-2.0.12/debian/control bird2-2.0.12/debian/control --- bird2-2.0.12/debian/control 2023-01-23 18:17:06.000000000 +0000 +++ bird2-2.0.12/debian/control 2023-04-26 11:13:31.000000000 +0000 @@ -8,12 +8,12 @@ libncurses-dev, libreadline-dev | libreadline6-dev | libreadline5-dev, libssh-gcrypt-dev, - linuxdoc-tools-latex, m4, - opensp, quilt, - texlive-latex-extra, xsltproc +Build-Depends-Indep: linuxdoc-tools-latex, + opensp, + texlive-latex-extra Maintainer: Jakub Ružička Uploaders: Ondřej Surý Standards-Version: 4.6.2 diff -Nru bird2-2.0.12/debian/patches/0003-BGP-Fix-bgp_med-handling.patch bird2-2.0.12/debian/patches/0003-BGP-Fix-bgp_med-handling.patch --- bird2-2.0.12/debian/patches/0003-BGP-Fix-bgp_med-handling.patch 1970-01-01 00:00:00.000000000 +0000 +++ bird2-2.0.12/debian/patches/0003-BGP-Fix-bgp_med-handling.patch 2023-04-26 11:13:31.000000000 +0000 @@ -0,0 +1,31 @@ +From f881b98d9b48e7a60c46dffc29009a86dac63233 Mon Sep 17 00:00:00 2001 +From: Ondrej Zajicek +Date: Tue, 4 Apr 2023 05:20:49 +0200 +Subject: [PATCH] BGP: Fix bgp_med handling + +Missing translation from BGP attribute ID to eattr ID in bgp_unset_attr() +broke automatic removal of bgp_med during export to EBGP peers. + +Thanks to Edward Sun for the bugreport. +--- + proto/bgp/bgp.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h +index a36949c2..0461ea28 100644 +--- a/proto/bgp/bgp.h ++++ b/proto/bgp/bgp.h +@@ -587,7 +587,9 @@ bgp_set_attr_data(ea_list **to, struct linpool *pool, uint code, uint flags, voi + bgp_set_attr(to, pool, code, flags, (uintptr_t) a); + } + +-#define bgp_unset_attr(to, pool, code) ea_unset_attr(to, pool, 0, code) ++static inline void ++bgp_unset_attr(ea_list **to, struct linpool *pool, uint code) ++{ ea_unset_attr(to, pool, 0, EA_CODE(PROTOCOL_BGP, code)); } + + int bgp_encode_mp_reach_mrt(struct bgp_write_state *s, eattr *a, byte *buf, uint size); + +-- +2.39.2 + diff -Nru bird2-2.0.12/debian/patches/series bird2-2.0.12/debian/patches/series --- bird2-2.0.12/debian/patches/series 2023-02-20 17:10:40.000000000 +0000 +++ bird2-2.0.12/debian/patches/series 2023-04-26 11:13:31.000000000 +0000 @@ -1,2 +1,3 @@ 0001-Increase-tests-timeout.patch 0002-Conf-Fix-too-early-free.patch +0003-BGP-Fix-bgp_med-handling.patch diff -Nru bird2-2.0.12/debian/rules bird2-2.0.12/debian/rules --- bird2-2.0.12/debian/rules 2023-01-23 17:25:08.000000000 +0000 +++ bird2-2.0.12/debian/rules 2023-04-26 11:13:31.000000000 +0000 @@ -23,8 +23,7 @@ override_dh_auto_configure: CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" dh_auto_configure -- $(COMMON_FLAGS) --with-protocols=all -override_dh_auto_build: - dh_auto_build +override_dh_auto_build-indep: dh_auto_build -- docs override_dh_auto_install: diff -Nru bird2-2.0.12/debian/tests/control bird2-2.0.12/debian/tests/control --- bird2-2.0.12/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ bird2-2.0.12/debian/tests/control 2023-04-26 15:29:52.000000000 +0000 @@ -0,0 +1,3 @@ +Tests: test-bird.sh +Restrictions: needs-root +Depends: bird2 diff -Nru bird2-2.0.12/debian/tests/test-bird.sh bird2-2.0.12/debian/tests/test-bird.sh --- bird2-2.0.12/debian/tests/test-bird.sh 1970-01-01 00:00:00.000000000 +0000 +++ bird2-2.0.12/debian/tests/test-bird.sh 2023-04-26 15:29:52.000000000 +0000 @@ -0,0 +1,105 @@ +#!/bin/bash + +set -e + +LOCAL=2001:db8:dead:: + +EXTERNAL=2001:db8:beef:: +EXTERNAL_NET=${EXTERNAL}/48 +EXTERNAL_NH=${LOCAL}beef + +LEARN=2001:db8:feed:: +LEARN_NET=${LEARN}/48 +LEARN_NH=${LOCAL}feed + +IFACE=bird-test-dummy +IFACE_EXISTS=false + +BIRD_RUNNING=false + +D=$(mktemp -d) +pushd ${D} >/dev/null + +stop_bird() { + birdc -l down >/dev/null + sleep 1 + grep -q " Shutdown completed" bird.log + [ ! -e bird.pid ] + [ ! -e bird.ctl ] +} + +cleanup() { + if ${BIRD_RUNNING}; then + stop_bird + if [ -e bird.pid ]; then + kill -9 $( /dev/null + rm -rf ${D} +} + +failed() { + cleanup + exit 1 +} + +trap failed ERR +trap failed INT +trap failed HUP + +ip link add ${IFACE} type dummy +IFACE_EXISTS=true + +ip link set ${IFACE} up +ip -6 addr add ${LOCAL}/64 dev bird-test-dummy + +ip -6 route add ${LEARN_NET} via ${LEARN_NH} + +cat >bird.conf <