summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetar Penkov <ppenkov@google.com>2019-07-05 20:46:43 +0200
committerDavid S. Miller <davem@davemloft.net>2019-07-11 23:22:53 +0200
commit63f9ba1bf8b6550365dc17a65d544cd75e68bf48 (patch)
tree2b0f1f17b68cc35d182ab2d4aea0f77986708349
parentMerge tag 'acpi-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/r... (diff)
downloadlinux-63f9ba1bf8b6550365dc17a65d544cd75e68bf48.tar.xz
linux-63f9ba1bf8b6550365dc17a65d544cd75e68bf48.zip
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 <ppenkov@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/fib_rules.h4
1 files changed, 2 insertions, 2 deletions
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 *,