[Devel] [PATCH RHEL7 COMMIT] ms/ipv6: fix backtracking for throw routes

Konstantin Khorenko khorenko at virtuozzo.com
Mon Apr 2 17:45:04 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.46.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.46.2
------>
commit b6e794367791acdef7d86fa7460fc53b756fb8ee
Author: Steven Barth <cyrus at openwrt.org>
Date:   Mon Apr 2 17:45:04 2018 +0300

    ms/ipv6: fix backtracking for throw routes
    
    for throw routes to trigger evaluation of other policy rules
    EAGAIN needs to be propagated up to fib_rules_lookup
    similar to how its done for IPv4
    
    A simple testcase for verification is:
    
    ip -6 rule add lookup 33333 priority 33333
    ip -6 route add throw 2001:db8::1
    ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333
    ip route get 2001:db8::1
    
    Signed-off-by: Steven Barth <cyrus at openwrt.org>
    Signed-off-by: David S. Miller <davem at davemloft.net>
    
    ms commit 73ba57bfae4a1914f6a6dac71e3168dd900e00af
    
    https://jira.sw.ru/browse/PSBM-81798
    Signed-off-by: Oleg Babin <obabin at virtuozzo.com>
    
    ============================
    Patchset description:
    Handle IPv6 throw routes properly
    
    IPv6 routing tables incorrectly handle routing rules for throw routes because
    error codes are not properly propagated up to the fib_rules_lookup().
    
    The issue is fixed in the mainline with the following two commits:
    
    Hannes Frederic Sowa (1):
      ms/ipv6: fib6_rules should return exact return value
    
    Steven Barth (1):
      ms/ipv6: fix backtracking for throw routes
---
 net/ipv6/fib6_rules.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index aad7cd103186..8b2e53f6ec10 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -115,6 +115,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
 				goto again;
 			flp6->saddr = saddr;
 		}
+		err = rt->dst.error;
 		goto out;
 	}
 again:


More information about the Devel mailing list