Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package smcroute for openSUSE:Factory checked in at 2021-09-28 19:16:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/smcroute (Old) and /work/SRC/openSUSE:Factory/.smcroute.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "smcroute" Tue Sep 28 19:16:32 2021 rev:6 rq:921884 version:2.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/smcroute/smcroute.changes 2021-09-14 21:15:05.552446425 +0200 +++ /work/SRC/openSUSE:Factory/.smcroute.new.1899/smcroute.changes 2021-09-28 19:17:25.800247889 +0200 @@ -1,0 +2,14 @@ +Thu Sep 23 20:32:44 UTC 2021 - Martin Hauke <mar...@gmx.de> + +- Update to version 2.5.3 + Changes + * New tests to verify add/del of IPv4/IPv6 routes in kernel MFC. + Fixes + * Fix #166: build warning with gcc 10.2.1: "comparison is always + true due to limited range of data type". + * Fix build warning with --disable-mrdisc configure option. + * Fix #167: cannot remove routes added with smcroutectl add, + only affects add/del at runtime with smcroutectl, not .conf + reload. + +------------------------------------------------------------------- Old: ---- smcroute-2.5.2.tar.gz New: ---- smcroute-2.5.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smcroute.spec ++++++ --- /var/tmp/diff_new_pack.ksUZW6/_old 2021-09-28 19:17:26.288248450 +0200 +++ /var/tmp/diff_new_pack.ksUZW6/_new 2021-09-28 19:17:26.288248450 +0200 @@ -18,7 +18,7 @@ Name: smcroute -Version: 2.5.2 +Version: 2.5.3 Release: 0 Summary: Static multicast routing for UNIX License: GPL-3.0-only ++++++ smcroute-2.5.2.tar.gz -> smcroute-2.5.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/ChangeLog.md new/smcroute-2.5.3/ChangeLog.md --- old/smcroute-2.5.2/ChangeLog.md 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/ChangeLog.md 2021-09-23 13:01:05.000000000 +0200 @@ -3,6 +3,22 @@ All notable changes to the project are documented in this file. + +[v2.5.3][] - 2021-09-23 +----------------------- + +### Changes +- New tests to verify add/del of IPv4/IPv6 routes in kernel MFC + +### Fixes +- Fix #166: build warning with gcc 10.2.1: "comparison is always true + due to limited range of data type" +- Fix build warning with `--disable-mrdisc` configure option +- Fix #167: cannot remove routes added with `smcroutectl add`, + only affects add/del at runtime with smcroutectl, not .conf reload +- Fix #168: build problem on Debian/kFreeBSD, used wrong queue.h + + [v2.5.2][] - 2021-08-27 ----------------------- @@ -574,7 +590,8 @@ [mrdisc]: https://github.com/troglobit/mrdisc [RFC4286]: https://tools.ietf.org/html/rfc4286 -[UNRELEASED]: https://github.com/troglobit/smcroute/compare/2.5.2...HEAD +[UNRELEASED]: https://github.com/troglobit/smcroute/compare/2.5.3...HEAD +[v2.5.3]: https://github.com/troglobit/smcroute/compare/2.5.2...2.5.3 [v2.5.2]: https://github.com/troglobit/smcroute/compare/2.5.1...2.5.2 [v2.5.1]: https://github.com/troglobit/smcroute/compare/2.5.0...2.5.1 [v2.5.0]: https://github.com/troglobit/smcroute/compare/2.4.4...2.5.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/Makefile.am new/smcroute-2.5.3/Makefile.am --- old/smcroute-2.5.2/Makefile.am 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/Makefile.am 2021-09-23 13:01:05.000000000 +0200 @@ -16,7 +16,7 @@ ## Check if tagged in git release-hook: - if [ ! `git tag | grep $(PACKAGE_VERSION)` ]; then \ + @if [ ! `git tag -l $(PACKAGE_VERSION) | grep $(PACKAGE_VERSION)` ]; then \ echo; \ printf "\e[1m\e[41mCannot find release tag $(PACKAGE_VERSION)\e[0m\n"; \ printf "\e[1m\e[5mDo release anyway?\e[0m "; read yorn; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/configure.ac new/smcroute-2.5.3/configure.ac --- old/smcroute-2.5.2/configure.ac 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/configure.ac 2021-09-23 13:01:05.000000000 +0200 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT(SMCRoute, 2.5.2, https://github.com/troglobit/smcroute/issues, smcroute, https://troglobit.com/smcroute.html) +AC_INIT(SMCRoute, 2.5.3, https://github.com/troglobit/smcroute/issues, smcroute, https://troglobit.com/smcroute.html) AC_CONFIG_AUX_DIR(aux) AM_INIT_AUTOMAKE([1.11 foreign]) AM_SILENT_RULES([yes]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/src/iface.c new/smcroute-2.5.3/src/iface.c --- old/smcroute-2.5.2/src/iface.c 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/src/iface.c 2021-09-23 13:01:05.000000000 +0200 @@ -21,6 +21,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "queue.h" + #include <errno.h> #include <string.h> #include <stdio.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/src/mcgroup.c new/smcroute-2.5.3/src/mcgroup.c --- old/smcroute-2.5.2/src/mcgroup.c 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/src/mcgroup.c 2021-09-23 13:01:05.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "config.h" +#include "queue.h" #include <errno.h> #include <stdio.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/src/mrdisc.c new/smcroute-2.5.3/src/mrdisc.c --- old/smcroute-2.5.2/src/mrdisc.c 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/src/mrdisc.c 2021-09-23 13:01:05.000000000 +0200 @@ -29,6 +29,7 @@ #endif #include "config.h" +#include "queue.h" #include <errno.h> #include <string.h> @@ -45,7 +46,6 @@ #include "log.h" #include "mrdisc.h" -#include "queue.h" #include "socket.h" #include "timer.h" #include "util.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/src/mroute.c new/smcroute-2.5.3/src/mroute.c --- old/smcroute-2.5.2/src/mroute.c 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/src/mroute.c 2021-09-23 13:01:05.000000000 +0200 @@ -22,6 +22,7 @@ */ #include "config.h" +#include "queue.h" #include <errno.h> #include <string.h> @@ -295,7 +296,7 @@ int rc = 0; if (iface->mrdisc) - mrdisc_deregister(iface->vif); + rc = mrdisc_deregister(iface->vif); if (kern_vif_del(iface)) { switch (errno) { @@ -309,9 +310,9 @@ rc = -1; } - if (iface->vif >= 0 && iface->vif < ALL_VIFS) + if (iface->vif != ALL_VIFS) mroute4_prune_vif(iface->vif); - iface->vif = -1; + iface->vif = ALL_VIFS; return rc; } @@ -534,13 +535,23 @@ return 0; } +/* + * When route has an empty oif list -- attempt full removal of the + * route, unless there exist other configured routes that map to the + * same kernel MFC entry. + * + * When route oif list is *not* empty, attempt to remove only select + * interfaces from the MFC entry. Again, unless other configured + * routes map to the same MFC entry. + */ static int mfc_uninstall(struct mroute *route) { - struct mroute *conf, *kern; + struct mroute *conf, *kern, *tmp; + int removal = !is_active(route); int diff = 0; int rc = 0; - TAILQ_FOREACH(kern, &kern_list, link) { + TAILQ_FOREACH_SAFE(kern, &kern_list, link, tmp) { if (!is_match(route, kern)) continue; @@ -549,7 +560,7 @@ /* First remove OIFs from route entry */ for (size_t i = 0; i < NELEMS(route->ttl); i++) { - if (route->ttl[i] > 0) { + if (removal || route->ttl[i] > 0) { kern->ttl[i] = 0; diff++; } @@ -568,10 +579,10 @@ } } - if (!diff && is_active(route)) + if (!diff && !removal) continue; - if (is_active(kern) || is_active(route)) { + if (is_active(kern) || !removal) { rc += kern_mroute_add(kern); continue; } @@ -668,7 +679,7 @@ } else { cleanup: TAILQ_REMOVE(&conf_list, conf, link); - rc = mfc_uninstall(conf); + rc = mfc_uninstall(route); free(conf); } @@ -911,9 +922,9 @@ rc = -1; } - if (iface->mif >= 0 && iface->mif < ALL_VIFS) + if (iface->mif != ALL_VIFS) mroute6_prune_mif(iface->mif); - iface->mif = -1; + iface->mif = ALL_VIFS; return rc; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/src/socket.c new/smcroute-2.5.3/src/socket.c --- old/smcroute-2.5.2/src/socket.c 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/src/socket.c 2021-09-23 13:01:05.000000000 +0200 @@ -18,6 +18,7 @@ */ #include "config.h" +#include "queue.h" #include <errno.h> #ifdef HAVE_FCNTL_H @@ -34,7 +35,6 @@ #include <sys/types.h> #include "log.h" -#include "queue.h" struct sock { LIST_ENTRY(sock) link; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/src/timer.c new/smcroute-2.5.3/src/timer.c --- old/smcroute-2.5.2/src/timer.c 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/src/timer.c 2021-09-23 13:01:05.000000000 +0200 @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "queue.h" + #include <errno.h> #include <signal.h> #include <string.h> /* memset() */ @@ -26,7 +28,6 @@ #include <time.h> #include "log.h" -#include "queue.h" #include "socket.h" #include "timer.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/test/Makefile.am new/smcroute-2.5.3/test/Makefile.am --- old/smcroute-2.5.2/test/Makefile.am 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/test/Makefile.am 2021-09-23 13:01:05.000000000 +0200 @@ -1,6 +1,7 @@ -EXTRA_DIST = adv.sh basic.sh bridge.sh dyn.sh expire.sh gre.sh ipv6.sh include.sh -EXTRA_DIST += isolated.sh join.sh joinlen.sh lib.sh lost.sh multi.sh mem.sh mrdisc.sh -EXTRA_DIST += poison.sh reload.sh reload6.sh vlan.sh vrfy.sh +EXTRA_DIST = adv.sh basic.sh bridge.sh dyn.sh expire.sh gre.sh ipv6.sh +EXTRA_DIST += include.sh isolated.sh join.sh joinlen.sh lib.sh lost.sh +EXTRA_DIST += multi.sh mem.sh mrcache.sh mrcache6.sh mrdisc.sh poison.sh +EXTRA_DIST += reload.sh reload6.sh vlan.sh vrfy.sh CLEANFILES = *~ *.trs *.log TEST_EXTENSIONS = .sh TESTS_ENVIRONMENT = unshare -mrun @@ -18,6 +19,8 @@ TESTS += joinlen.sh TESTS += lost.sh TESTS += mem.sh +TESTS += mrcache.sh +TESTS += mrcache6.sh TESTS += mrdisc.sh TESTS += multi.sh TESTS += poison.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/test/adv.sh new/smcroute-2.5.3/test/adv.sh --- old/smcroute-2.5.2/test/adv.sh 2021-08-27 17:55:39.000000000 +0200 +++ new/smcroute-2.5.3/test/adv.sh 2021-09-23 13:01:05.000000000 +0200 @@ -23,19 +23,23 @@ print "Starting smcrouted ..." ../src/smcrouted -f "/tmp/$NM/conf" -n -N -P "/tmp/$NM/pid" -l debug -u "/tmp/$NM/sock" & +# Start emitters on a1 for 225.1.2.1 .. 225.1.2.10 emitter a1 10 show_mroute +# Sanity check, the route from the conf file should work collect a2 -c3 'dst 225.1.2.3' sleep 3 lines1=$(tshark -r "/tmp/$NM/pcap" 2>/dev/null | grep 225.1.2.3 | tee "/tmp/$NM/result" | wc -l) # shellcheck disable=SC2086 [ $lines1 -lt 3 ] && FAIL +# Add (*,G) routes for 225.1.2.1 .. 225.1.2.7, overlapping with previous 225.1.2.3 print "Adding *,225.1.2.3/29 ASM routes ..." ../src/smcroutectl -u "/tmp/$NM/sock" add a1 225.1.2.3/29 a2 show_mroute +# Check for a sample of the added routes collect a2 -c6 'dst 225.1.2.6 or dst 225.1.2.3' sleep 3 @@ -46,10 +50,12 @@ # shellcheck disable=SC2086 disable=SC2166 [ $lines1 -lt 3 -o $lines2 -lt 3 ] && FAIL +# When removing (*,G) routes, the (S,G) route from the conf file should remain print "Removing *,225.1.2.3/29 ASM routes ..." ../src/smcroutectl -u "/tmp/$NM/sock" del a1 225.1.2.3/29 show_mroute +# Check for same sample, now we should no longer see 225.1.2.6, only 225.1.2.3 collect a2 -c3 'dst 225.1.2.6 or dst 225.1.2.3' sleep 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/test/mrcache.sh new/smcroute-2.5.3/test/mrcache.sh --- old/smcroute-2.5.2/test/mrcache.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/smcroute-2.5.3/test/mrcache.sh 2021-09-23 13:01:05.000000000 +0200 @@ -0,0 +1,52 @@ +#!/bin/sh +# Verifies IPv4 (S,G) add and remove route via IPC bites in kernel. +# Twist: uses only one interface, inteded to mimic Debian test. +#set -x + +# shellcheck source=/dev/null +. "$(dirname "$0")/lib.sh" + +debug() +{ + cat /proc/net/ip_mr_cache + ip mroute + echo "-----------------------------------------------------------------------------------" + ../src/smcroutectl -pd -u "/tmp/$NM/sock" +} + +print "Creating world ..." +topo basic +ip addr add 10.0.0.1/24 dev a1 +ip -br a + +print "Creating config ..." +cat <<EOF > "/tmp/$NM/conf" +# empty +EOF +cat "/tmp/$NM/conf" + +print "Starting smcrouted ..." +../src/smcrouted -f "/tmp/$NM/conf" -n -P "/tmp/$NM/pid" -l debug -u "/tmp/$NM/sock" & +sleep 1 + +print "Adding IPC route ..." +../src/smcroutectl -u "/tmp/$NM/sock" add a1 10.0.0.1 224.0.1.20 a1 +sleep 1 + +print "Verifying kernel route ..." +debug +if ! grep "140100E0 0100000A 2 0 0 0 2:1" /proc/net/ip_mr_cache; then + FAIL +fi + +print "Removing IPC route ..." +../src/smcroutectl -u "/tmp/$NM/sock" del a1 10.0.0.1 224.0.1.20 +sleep 1 + +print "Verifying kernel route ..." +debug +if grep "140100E0 0100000A" /proc/net/ip_mr_cache; then + FAIL +fi + +OK diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/smcroute-2.5.2/test/mrcache6.sh new/smcroute-2.5.3/test/mrcache6.sh --- old/smcroute-2.5.2/test/mrcache6.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/smcroute-2.5.3/test/mrcache6.sh 2021-09-23 13:01:05.000000000 +0200 @@ -0,0 +1,52 @@ +#!/bin/sh +# Verifies IPv6 (S,G) add and remove route via IPC bites in kernel. +# Twist: uses only one interface, inteded to mimic Debian test. +#set -x + +# shellcheck source=/dev/null +. "$(dirname "$0")/lib.sh" + +debug() +{ + cat /proc/net/ip6_mr_cache + ip -6 mroute + echo "-----------------------------------------------------------------------------------" + ../src/smcroutectl -pd -u "/tmp/$NM/sock" +} + +print "Creating world ..." +topo basic +ip addr add fc01::1/64 dev a1 +ip -br a + +print "Creating config ..." +cat <<EOF > "/tmp/$NM/conf" +# empty +EOF +cat "/tmp/$NM/conf" + +print "Starting smcrouted ..." +../src/smcrouted -f "/tmp/$NM/conf" -n -P "/tmp/$NM/pid" -l debug -u "/tmp/$NM/sock" & +sleep 1 + +print "Adding IPC route ..." +../src/smcroutectl -u "/tmp/$NM/sock" add a1 fc01::1 ff01:0:0:0:0:0:0:114 a1 +sleep 1 + +print "Verifying kernel route ..." +debug +if ! grep "ff01:0000:0000:0000:0000:0000:0000:0114 fc01:0000:0000:0000:0000:0000:0000:0001 2 0 0 0 2:1" /proc/net/ip6_mr_cache; then + FAIL +fi + +print "Removing IPC route ..." +../src/smcroutectl -u "/tmp/$NM/sock" del a1 fc01::1 ff01:0:0:0:0:0:0:114 +sleep 1 + +print "Verifying kernel route ..." +debug +if grep "ff01:0000:0000:0000:0000:0000:0000:0114 fc01:0000:0000:0000:0000:0000:0000:0001" /proc/net/ip_mr_cache; then + FAIL +fi + +OK