Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cloud-netconfig for openSUSE:Factory checked in at 2025-05-30 14:34:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cloud-netconfig (Old) and /work/SRC/openSUSE:Factory/.cloud-netconfig.new.25440 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cloud-netconfig" Fri May 30 14:34:57 2025 rev:21 rq:1280964 version:1.15 Changes: -------- --- /work/SRC/openSUSE:Factory/cloud-netconfig/cloud-netconfig.changes 2024-03-22 15:32:20.302788846 +0100 +++ /work/SRC/openSUSE:Factory/.cloud-netconfig.new.25440/cloud-netconfig.changes 2025-05-30 17:20:16.206621388 +0200 @@ -1,0 +2,7 @@ +Fri May 16 13:48:50 UTC 2025 - Joachim Gleissner <jgleiss...@suse.com> + +- Update to version 1.15 + + Add support for creating IPv6 default route in GCE (bsc#1240869) + + Minor fix when looking up IPv6 default route + +------------------------------------------------------------------- Old: ---- cloud-netconfig-1.14.tar.bz2 New: ---- cloud-netconfig-1.15.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cloud-netconfig.spec ++++++ --- /var/tmp/diff_new_pack.yikxo1/_old 2025-05-30 17:20:16.666640825 +0200 +++ /var/tmp/diff_new_pack.yikxo1/_new 2025-05-30 17:20:16.666640825 +0200 @@ -1,7 +1,7 @@ # # spec file for package cloud-netconfig # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -48,7 +48,7 @@ %endif Name: %{base_name}%{flavor_suffix} -Version: 1.14 +Version: 1.15 Release: 0 License: GPL-3.0-or-later Summary: Network configuration scripts for %{csp_string} ++++++ cloud-netconfig-1.14.tar.bz2 -> cloud-netconfig-1.15.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloud-netconfig-1.14/VERSION new/cloud-netconfig-1.15/VERSION --- old/cloud-netconfig-1.14/VERSION 2024-03-20 15:41:47.646467296 +0100 +++ new/cloud-netconfig-1.15/VERSION 2025-05-14 16:19:55.128292615 +0200 @@ -1 +1 @@ -1.14 +1.15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloud-netconfig-1.14/azure/functions.cloud-netconfig new/cloud-netconfig-1.15/azure/functions.cloud-netconfig --- old/cloud-netconfig-1.14/azure/functions.cloud-netconfig 2024-03-20 15:41:47.646467296 +0100 +++ new/cloud-netconfig-1.15/azure/functions.cloud-netconfig 2025-05-14 16:19:55.128292615 +0200 @@ -123,6 +123,14 @@ } # ------------------------------------------------------------------- +# dummy, no gateway information in metadata +# +get_ipv6_gateway_from_metadata() +{ + return 0 +} + +# ------------------------------------------------------------------- # check whether metadata server is available # metadata_available() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloud-netconfig-1.14/cloud-netconfig.spec new/cloud-netconfig-1.15/cloud-netconfig.spec --- old/cloud-netconfig-1.14/cloud-netconfig.spec 2024-03-20 15:41:47.646467296 +0100 +++ new/cloud-netconfig-1.15/cloud-netconfig.spec 2025-05-14 16:19:55.128292615 +0200 @@ -1,5 +1,5 @@ # -# spec file +# spec file for package cloud-netconfig # # Copyright (c) 2024 SUSE LLC # @@ -48,7 +48,7 @@ %endif Name: %{base_name}%{flavor_suffix} -Version: 1.14 +Version: 1.15 Release: 0 License: GPL-3.0-or-later Summary: Network configuration scripts for %{csp_string} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloud-netconfig-1.14/common/cloud-netconfig new/cloud-netconfig-1.15/common/cloud-netconfig --- old/cloud-netconfig-1.14/common/cloud-netconfig 2024-03-09 14:11:54.869859294 +0100 +++ new/cloud-netconfig-1.15/common/cloud-netconfig 2025-05-16 15:48:18.812806442 +0200 @@ -362,20 +362,20 @@ # update routing policies so connections from addresses on # secondary interfaces are routed via those - # also include IP rangers + # also include IP ranges local found prio from ip rest for addr in ${addrs[@]} ; do found=0 while read -r prio from ip rest ; do - if [[ "${addr%/32}" == "$ip" ]]; then + if [[ "${addr%/*}" == "$ip" ]]; then found=1 break fi done < <(ip $ipv rule show) if [[ $found == 0 ]]; then - debug "creating policy rule for src address ${addr%/32}" - ip $ipv rule add from ${addr%/32} priority $dest_table lookup $dest_table - ip $ipv rule add from ${addr%/32} priority $gw_table lookup $gw_table + debug "creating policy rule for src address ${addr%/*}" + ip $ipv rule add from ${addr%/*} priority $dest_table lookup $dest_table + ip $ipv rule add from ${addr%/*} priority $gw_table lookup $gw_table fi done @@ -557,6 +557,11 @@ local INTERFACE="$1" test -z "$INTERFACE" && return 1 + local HWADDR="$(cat /sys/class/net/${INTERFACE}/address)" + if [ -z "$HWADDR" ]; then + warn "Could not determine MAC address for $INTERFACE" + return 1 + fi local ifindex="$(cat /sys/class/net/${INTERFACE}/ifindex)" if [ -z "$ifindex" ]; then warn "Could not determine interface index for $INTERFACE" @@ -567,9 +572,10 @@ local gw_table="$((ifindex+30400))" # if necessary, create route table with default route for interface - if [ -z "$(ip -6 route show default dev $INTERFACE table $RTABLE 2>/dev/null)" ]; then + if [ -z "$(ip -6 route show default dev $INTERFACE table $gw_table 2>/dev/null)" ]; then # it is possible that we received the DHCP response before the # the router advertisement; in that case, we wait up to 10 secs + debug "waiting for IPv6 gateway" local route via GW rest counter=0 while [[ $counter -lt 10 ]]; do counter=$((counter+1)) @@ -580,6 +586,17 @@ sleep 1 fi done + # GCE does not advertise default routes on secondary interfaces + # but available from metadata + if [[ -z $GW ]]; then + GW=$(get_ipv6_gateway_from_metadata $HWADDR) + if [[ -n $GW ]]; then + debug "adding default route via $GW for $INTERFACE table $gw_table" + ip -6 route add default via $GW dev "$INTERFACE" metric $((ifindex+20000)) + else + warn "No IPv6 default route for $INTERFACE" + fi + fi fi update_routing_tables -6 $INTERFACE $dest_table $gw_table diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloud-netconfig-1.14/ec2/functions.cloud-netconfig new/cloud-netconfig-1.15/ec2/functions.cloud-netconfig --- old/cloud-netconfig-1.14/ec2/functions.cloud-netconfig 2024-03-09 13:29:18.063558707 +0100 +++ new/cloud-netconfig-1.15/ec2/functions.cloud-netconfig 2025-05-14 16:19:55.128292615 +0200 @@ -120,6 +120,14 @@ } # ------------------------------------------------------------------- +# dummy, EC2 provides gateway router advertisements +# +get_ipv6_gateway_from_metadata() +{ + return 0 +} + +# ------------------------------------------------------------------- # check if metadata server is available # metadata_available() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cloud-netconfig-1.14/gce/functions.cloud-netconfig new/cloud-netconfig-1.15/gce/functions.cloud-netconfig --- old/cloud-netconfig-1.14/gce/functions.cloud-netconfig 2024-02-08 10:49:19.979019815 +0100 +++ new/cloud-netconfig-1.15/gce/functions.cloud-netconfig 2025-05-14 16:19:55.129292634 +0200 @@ -73,6 +73,26 @@ } # ------------------------------------------------------------------- +# look up IPv6 gateway information in metadata +# +get_ipv6_gateway_from_metadata() +{ + local hwaddr="$1" + test -z "$hwaddr" && return 1 + + local nics=$(get_from_metadata) + for idx in $nics ; do + local mac=$(get_from_metadata "${idx}mac") + debug "checking $mac" + if [[ $mac == $hwaddr ]]; then + get_from_metadata ${idx}gateway-ipv6 + return 0 + fi + done + return 1 +} + +# ------------------------------------------------------------------- # look up IP range information for interface # get_ipv4_ranges_from_metadata()