From 6a5bf66a42110c0415715acfed80bb1771a9844f Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 23 Feb 2025 16:01:58 +0100 Subject: [PATCH 1/3] Fix #956: skip chown() on running-config, not applicable Signed-off-by: Joachim Wiberg --- src/bin/copy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/copy.c b/src/bin/copy.c index c16368d6d..1649c28c8 100644 --- a/src/bin/copy.c +++ b/src/bin/copy.c @@ -83,11 +83,14 @@ static void set_owner(const char *fn, const char *user) { struct passwd *pw; + if (!fn) + return; /* not an error, e.g., running-config is not a file */ + pw = getpwnam(user); if (pw && !chmod(fn, 0660) && !chown(fn, pw->pw_uid, pw->pw_gid)) return; - fprintf(stderr, ERRMSG "setting owner %s on %s: %s\n", fn, user, strerror(errno)); + fprintf(stderr, ERRMSG "setting owner %s on %s: %s\n", user, fn, strerror(errno)); } static const char *infix_ds(const char *text, struct infix_ds **ds) From f690cd216c559ad82aabc1887bdfc1fbed78adf9 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 23 Feb 2025 16:06:29 +0100 Subject: [PATCH 2/3] Fix #923: drop default route for IPv4 autoconf Signed-off-by: Joachim Wiberg --- .../rootfs/etc/avahi/avahi-autoipd.action | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/board/common/rootfs/etc/avahi/avahi-autoipd.action b/board/common/rootfs/etc/avahi/avahi-autoipd.action index 20912b82e..464748d12 100755 --- a/board/common/rootfs/etc/avahi/avahi-autoipd.action +++ b/board/common/rootfs/etc/avahi/avahi-autoipd.action @@ -9,46 +9,20 @@ # $3 IP adddress PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin" -NAME="/etc/frr/static.d/$2-zeroconf.conf" -NEXT="${NAME}+" log() { logger -I $$ -t zeroconf -p user.notice "$*" } -# Reduce changes needed by comparing with previous route(s) -act() -{ - case $1 in - add) - echo "! Generated by avahi-autoipd" > "$NEXT" - echo "ip route 0.0.0.0/0 $2 254" >> "$NEXT" - cmp -s "$NAME" "$NEXT" && return - mv "$NEXT" "$NAME" - ;; - del) - [ -f "$NAME" ] || return - rm "$NAME" - ;; - *) - return - ;; - esac - - initctl -nbq restart staticd -} - case "$1" in BIND) ip addr flush dev "$2" proto random ip addr add "$3"/16 brd 169.254.255.255 scope link dev "$2" proto random - act add "$2" log "set ipv4ll $3 on iface $2" ;; CONFLICT|UNBIND|STOP) - act del "$2" ip addr flush dev "$2" proto random log "clr ipv4ll on iface $2" ;; From 2d7dedf79c6475136a4e7afcc4d3700561ff8e67 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 24 Feb 2025 05:41:34 +0100 Subject: [PATCH 3/3] doc: update ChangeLog for v25.02 Signed-off-by: Joachim Wiberg --- doc/ChangeLog.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index 356a94606..f8f66b153 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -12,9 +12,13 @@ All notable changes to the project are documented in this file. - YANG type for SSH private/public keys has changed, from ietf-crypto-types to infix-crypto-types - Add support for link aggregation (lag), static (balance-xor) and LACP + - Drop automatic default route (interface route) for IPv4 autoconf, not + necessary and causes more confusion than good. Issue #923 ### Fixes - - N/A + - Fix #956: CLI `copy` command complains it cannot change owner when + copying `factory-config` to `running-config`. Bogus error, the + latter is not really a file [v25.01.0][] - 2025-01-31