adcc9c6f39
- kdump-pass-IPv6-address-prefix-separately.patch: IPv6 setup: pass address prefix in separate dracut arg (bsc#1062026). - kdump-pass-all-IP-routes-to-kdump-environment.patch: IP setup: pass all routes to kdump environment (bsc#1062026). - kdump-remove-IPv6-brackets-for-getaddrinfo.patch: Routable: do not pass bracketed IPv6 to getaddrinfo (bsc#1062026). - kdump-skip-IPv4-if-no-address.patch: IP setup: don't bother with IPv4 if there are no addresses (bsc#1062026). OBS-URL: https://build.opensuse.org/request/show/594067 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=161
57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
From: Michal Koutny <mkoutny@suse.com>
|
|
Date: Mon, 26 Mar 2018 20:40:40 +0200
|
|
Subject: IP setup: pass all routes to kdump environment
|
|
References: bsc#1062026
|
|
Upstream: merged
|
|
Git-commit: 7013c7f7e081b1691a6b30ba213c39a5ab38e5fe
|
|
|
|
In some network setups the kdump target may not be routable through the
|
|
default route. Thus pass all found routes.
|
|
|
|
---
|
|
init/setup-kdump.functions | 12 ++++++++++++
|
|
1 file changed, 12 insertions(+)
|
|
|
|
--- a/init/setup-kdump.functions
|
|
+++ b/init/setup-kdump.functions
|
|
@@ -550,6 +550,7 @@ function kdump_ip_config() # {{{
|
|
local ipaddr peeraddr gwaddr netmask hostname
|
|
local family cidr rest
|
|
local prefix
|
|
+ local routes r
|
|
while read family cidr rest
|
|
do
|
|
[ "$family" = "inet" ] || continue
|
|
@@ -572,6 +573,11 @@ function kdump_ip_config() # {{{
|
|
hostname=$(hostname)
|
|
|
|
echo "ip=$ipaddr:$peeraddr:$gwaddr:$netmask:$hostname:$bootif:none"
|
|
+
|
|
+ routes=$(ip route show dev "$iface" | sed -n 's/\([0-9].*\) via \([^ ]*\).*/\1:\2/p')
|
|
+ for r in $routes ; do
|
|
+ echo "rd.route=$r:$bootif"
|
|
+ done
|
|
} # }}}
|
|
|
|
#
|
|
@@ -588,6 +594,7 @@ function kdump_ip6_config() # {{
|
|
local bootif="$2"
|
|
local ipaddr peeraddr gwaddr netmask hostname
|
|
local family cidr rest prefix
|
|
+ local routes r
|
|
|
|
hostname=$(hostname)
|
|
gwaddr=$(ip -6 route show ::/0 | sed -n 's/.* via \([^ ]*\).*/[\1]/p')
|
|
@@ -612,6 +619,11 @@ function kdump_ip6_config() # {{
|
|
|
|
echo "ip=$ipaddr:$peeraddr:$gwaddr:$netmask:$hostname:$bootif:none"
|
|
done < <(ip -6 address show dev "$iface" permanent scope global)
|
|
+
|
|
+ routes=$(ip -6 route show dev "$iface" | sed -n 's/\([0-9a-fA-F:].*\) via \([^ ]*\).*/[\1]:[\2]/p')
|
|
+ for r in $routes ; do
|
|
+ echo "rd.route=$r:$bootif"
|
|
+ done
|
|
} # }}}
|
|
|
|
#
|