projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a2d73a
)
ipv6: fib6_rules: support for match on sport, dport and ip proto
author
Roopa Prabhu
<
[email protected]
>
Thu, 1 Mar 2018 03:41:37 +0000
(22:41 -0500)
committer
David S. Miller
<
[email protected]
>
Thu, 1 Mar 2018 03:44:43 +0000
(22:44 -0500)
support to match on src port, dst port and ip protocol.
Signed-off-by: Roopa Prabhu <
[email protected]
>
Acked-by: Nikolay Aleksandrov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv6/fib6_rules.c
patch
|
blob
|
history
diff --git
a/net/ipv6/fib6_rules.c
b/net/ipv6/fib6_rules.c
index 95a2c9e8699a7a40056a987a3eeb5bf42edfa0b4..bcd1f22ac7b16e57a6aa8737b32aa4a2c22e5bb7 100644
(file)
--- a/
net/ipv6/fib6_rules.c
+++ b/
net/ipv6/fib6_rules.c
@@
-223,6
+223,17
@@
static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
if (r->tclass && r->tclass != ip6_tclass(fl6->flowlabel))
return 0;
+ if (rule->ip_proto && (rule->ip_proto != fl6->flowi6_proto))
+ return 0;
+
+ if (fib_rule_port_range_set(&rule->sport_range) &&
+ !fib_rule_port_inrange(&rule->sport_range, fl6->fl6_sport))
+ return 0;
+
+ if (fib_rule_port_range_set(&rule->dport_range) &&
+ !fib_rule_port_inrange(&rule->dport_range, fl6->fl6_dport))
+ return 0;
+
return 1;
}