From: Petar Penkov Date: Fri, 5 Jul 2019 18:46:43 +0000 (-0700) Subject: net: fib_rules: do not flow dissect local packets X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=63f9ba1bf8b6550365dc17a65d544cd75e68bf48;p=openwrt%2Fstaging%2Fblogic.git net: fib_rules: do not flow dissect local packets Rules matching on loopback iif do not need early flow dissection as the packet originates from the host. Stop counting such rules in fib_rule_requires_fldissect Signed-off-by: Petar Penkov Signed-off-by: David S. Miller --- diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index eba8465e1d86..20dcadd8eed9 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -180,9 +180,9 @@ static inline bool fib_rule_port_range_compare(struct fib_rule_port_range *a, static inline bool fib_rule_requires_fldissect(struct fib_rule *rule) { - return rule->ip_proto || + return rule->iifindex != LOOPBACK_IFINDEX && (rule->ip_proto || fib_rule_port_range_set(&rule->sport_range) || - fib_rule_port_range_set(&rule->dport_range); + fib_rule_port_range_set(&rule->dport_range)); } struct fib_rules_ops *fib_rules_register(const struct fib_rules_ops *,