From: Greg Kroah-Hartman Date: Wed, 25 Nov 2020 12:20:12 +0000 (+0100) Subject: 5.9-stable patches X-Git-Tag: v4.4.247~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e005c5e8917814d2158315ba1d9528075cafad8;p=thirdparty%2Fkernel%2Fstable-queue.git 5.9-stable patches added patches: ipv4-use-is_enabled-instead-of-ifdef.patch --- diff --git a/queue-5.9/ipv4-use-is_enabled-instead-of-ifdef.patch b/queue-5.9/ipv4-use-is_enabled-instead-of-ifdef.patch new file mode 100644 index 00000000000..556fca901d8 --- /dev/null +++ b/queue-5.9/ipv4-use-is_enabled-instead-of-ifdef.patch @@ -0,0 +1,43 @@ +From c09c8a27b9baa417864b9adc3228b10ae5eeec93 Mon Sep 17 00:00:00 2001 +From: Florian Klink +Date: Sun, 15 Nov 2020 23:45:09 +0100 +Subject: ipv4: use IS_ENABLED instead of ifdef + +From: Florian Klink + +commit c09c8a27b9baa417864b9adc3228b10ae5eeec93 upstream. + +Checking for ifdef CONFIG_x fails if CONFIG_x=m. + +Use IS_ENABLED instead, which is true for both built-ins and modules. + +Otherwise, a +> ip -4 route add 1.2.3.4/32 via inet6 fe80::2 dev eth1 +fails with the message "Error: IPv6 support not enabled in kernel." if +CONFIG_IPV6 is `m`. + +In the spirit of b8127113d01e53adba15b41aefd37b90ed83d631. + +Fixes: d15662682db2 ("ipv4: Allow ipv6 gateway with ipv4 routes") +Cc: Kim Phillips +Signed-off-by: Florian Klink +Reviewed-by: David Ahern +Link: https://lore.kernel.org/r/20201115224509.2020651-1-flokli@flokli.de +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/fib_frontend.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/ipv4/fib_frontend.c ++++ b/net/ipv4/fib_frontend.c +@@ -696,7 +696,7 @@ int fib_gw_from_via(struct fib_config *c + cfg->fc_gw4 = *((__be32 *)via->rtvia_addr); + break; + case AF_INET6: +-#ifdef CONFIG_IPV6 ++#if IS_ENABLED(CONFIG_IPV6) + if (alen != sizeof(struct in6_addr)) { + NL_SET_ERR_MSG(extack, "Invalid IPv6 address in RTA_VIA"); + return -EINVAL; diff --git a/queue-5.9/series b/queue-5.9/series index 8aceea7fb4f..e421fbb407b 100644 --- a/queue-5.9/series +++ b/queue-5.9/series @@ -2,3 +2,4 @@ io_uring-get-an-active-ref_node-from-files_data.patch io_uring-order-refnode-recycling.patch spi-bcm-qspi-fix-use-after-free-on-unbind.patch spi-bcm2835-fix-use-after-free-on-unbind.patch +ipv4-use-is_enabled-instead-of-ifdef.patch