Home
last modified time | relevance | path

Searched refs:rule (Results 1 – 25 of 26) sorted by relevance

12

/net/core/
Dfib_rules.c23 bool fib_rule_matchall(const struct fib_rule *rule) in fib_rule_matchall() argument
25 if (rule->iifindex || rule->oifindex || rule->mark || rule->tun_id || in fib_rule_matchall()
26 rule->flags) in fib_rule_matchall()
28 if (rule->suppress_ifgroup != -1 || rule->suppress_prefixlen != -1) in fib_rule_matchall()
30 if (!uid_eq(rule->uid_range.start, fib_kuid_range_unset.start) || in fib_rule_matchall()
31 !uid_eq(rule->uid_range.end, fib_kuid_range_unset.end)) in fib_rule_matchall()
33 if (fib_rule_port_range_set(&rule->sport_range)) in fib_rule_matchall()
35 if (fib_rule_port_range_set(&rule->dport_range)) in fib_rule_matchall()
72 struct fib_rule *rule; in fib_default_rule_pref() local
77 rule = list_entry(pos->next, struct fib_rule, list); in fib_default_rule_pref()
[all …]
Dflow_offload.c10 struct flow_rule *rule; in flow_rule_alloc() local
12 rule = kzalloc(struct_size(rule, action.entries, num_actions), in flow_rule_alloc()
14 if (!rule) in flow_rule_alloc()
17 rule->action.num_entries = num_actions; in flow_rule_alloc()
19 return rule; in flow_rule_alloc()
30 void flow_rule_match_meta(const struct flow_rule *rule, in flow_rule_match_meta() argument
33 FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_META, out); in flow_rule_match_meta()
37 void flow_rule_match_basic(const struct flow_rule *rule, in flow_rule_match_basic() argument
40 FLOW_DISSECTOR_MATCH(rule, FLOW_DISSECTOR_KEY_BASIC, out); in flow_rule_match_basic()
44 void flow_rule_match_control(const struct flow_rule *rule, in flow_rule_match_control() argument
[all …]
Dethtool.c2882 flow->rule = flow_rule_alloc(1); in ethtool_rx_flow_rule_create()
2883 if (!flow->rule) { in ethtool_rx_flow_rule_create()
2889 flow->rule->match.dissector = &match->dissector; in ethtool_rx_flow_rule_create()
2890 flow->rule->match.mask = &match->mask; in ethtool_rx_flow_rule_create()
2891 flow->rule->match.key = &match->key; in ethtool_rx_flow_rule_create()
3091 act = &flow->rule->action.entries[0]; in ethtool_rx_flow_rule_create()
3115 kfree(flow->rule); in ethtool_rx_flow_rule_destroy()
/net/ipv4/
Dfib_rules.c47 static bool fib4_rule_matchall(const struct fib_rule *rule) in fib4_rule_matchall() argument
49 struct fib4_rule *r = container_of(rule, struct fib4_rule, common); in fib4_rule_matchall()
53 return fib_rule_matchall(rule); in fib4_rule_matchall()
56 bool fib4_rule_default(const struct fib_rule *rule) in fib4_rule_default() argument
58 if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib4_rule_default()
59 rule->l3mdev) in fib4_rule_default()
61 if (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN && in fib4_rule_default()
62 rule->table != RT_TABLE_DEFAULT) in fib4_rule_default()
92 if (arg.rule) in __fib_lookup()
93 res->tclassid = ((struct fib4_rule *)arg.rule)->tclassid; in __fib_lookup()
[all …]
Dipmr.c164 static int ipmr_rule_action(struct fib_rule *rule, struct flowi *flp, in ipmr_rule_action() argument
170 switch (rule->action) { in ipmr_rule_action()
182 arg->table = fib_rule_get_table(rule, arg); in ipmr_rule_action()
184 mrt = ipmr_get_table(rule->fr_net, arg->table); in ipmr_rule_action()
191 static int ipmr_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) in ipmr_rule_match() argument
200 static int ipmr_rule_configure(struct fib_rule *rule, struct sk_buff *skb, in ipmr_rule_configure() argument
207 static int ipmr_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, in ipmr_rule_compare() argument
213 static int ipmr_rule_fill(struct fib_rule *rule, struct sk_buff *skb, in ipmr_rule_fill() argument
293 bool ipmr_rule_default(const struct fib_rule *rule) in ipmr_rule_default() argument
295 return fib_rule_matchall(rule) && rule->table == RT_TABLE_DEFAULT; in ipmr_rule_default()
[all …]
/net/ipv6/
Dfib6_rules.c30 static bool fib6_rule_matchall(const struct fib_rule *rule) in fib6_rule_matchall() argument
32 struct fib6_rule *r = container_of(rule, struct fib6_rule, common); in fib6_rule_matchall()
36 return fib_rule_matchall(rule); in fib6_rule_matchall()
39 bool fib6_rule_default(const struct fib_rule *rule) in fib6_rule_default() argument
41 if (!fib6_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib6_rule_default()
42 rule->l3mdev) in fib6_rule_default()
44 if (rule->table != RT6_TABLE_LOCAL && rule->table != RT6_TABLE_MAIN) in fib6_rule_default()
128 static int fib6_rule_saddr(struct net *net, struct fib_rule *rule, int flags, in fib6_rule_saddr() argument
131 struct fib6_rule *r = (struct fib6_rule *)rule; in fib6_rule_saddr()
136 if ((rule->flags & FIB_RULE_FIND_SADDR) && in fib6_rule_saddr()
[all …]
Dip6mr.c151 static int ip6mr_rule_action(struct fib_rule *rule, struct flowi *flp, in ip6mr_rule_action() argument
157 switch (rule->action) { in ip6mr_rule_action()
169 arg->table = fib_rule_get_table(rule, arg); in ip6mr_rule_action()
171 mrt = ip6mr_get_table(rule->fr_net, arg->table); in ip6mr_rule_action()
178 static int ip6mr_rule_match(struct fib_rule *rule, struct flowi *flp, int flags) in ip6mr_rule_match() argument
187 static int ip6mr_rule_configure(struct fib_rule *rule, struct sk_buff *skb, in ip6mr_rule_configure() argument
194 static int ip6mr_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, in ip6mr_rule_compare() argument
200 static int ip6mr_rule_fill(struct fib_rule *rule, struct sk_buff *skb, in ip6mr_rule_fill() argument
280 bool ip6mr_rule_default(const struct fib_rule *rule) in ip6mr_rule_default() argument
282 return fib_rule_matchall(rule) && rule->action == FR_ACT_TO_TBL && in ip6mr_rule_default()
[all …]
/net/netfilter/
Dnf_tables_offload.c20 flow->rule = flow_rule_alloc(num_actions); in nft_flow_rule_alloc()
21 if (!flow->rule) { in nft_flow_rule_alloc()
26 flow->rule->match.dissector = &flow->match.dissector; in nft_flow_rule_alloc()
27 flow->rule->match.mask = &flow->match.mask; in nft_flow_rule_alloc()
28 flow->rule->match.key = &flow->match.key; in nft_flow_rule_alloc()
51 const struct nft_rule *rule) in nft_flow_rule_create() argument
58 expr = nft_expr_first(rule); in nft_flow_rule_create()
59 while (nft_expr_more(rule, expr)) { in nft_flow_rule_create()
74 expr = nft_expr_first(rule); in nft_flow_rule_create()
84 while (nft_expr_more(rule, expr)) { in nft_flow_rule_create()
[all …]
Dnf_tables_core.c41 const struct nft_rule *rule, in nft_trace_packet() argument
45 info->rule = rule; in nft_trace_packet()
154 const struct nft_rule *rule; in nft_do_chain() local
172 rule = *rules; in nft_do_chain()
175 rule = *rules; in nft_do_chain()
176 nft_rule_for_each_expr(expr, last, rule) { in nft_do_chain()
192 nft_trace_packet(&info, chain, rule, in nft_do_chain()
204 nft_trace_packet(&info, chain, rule, in nft_do_chain()
218 nft_trace_packet(&info, chain, rule, in nft_do_chain()
225 nft_trace_packet(&info, chain, rule, in nft_do_chain()
Dnf_tables_api.c310 struct nft_rule *rule) in nft_rule_expr_activate() argument
314 expr = nft_expr_first(rule); in nft_rule_expr_activate()
315 while (nft_expr_more(rule, expr)) { in nft_rule_expr_activate()
324 struct nft_rule *rule, in nft_rule_expr_deactivate() argument
329 expr = nft_expr_first(rule); in nft_rule_expr_deactivate()
330 while (nft_expr_more(rule, expr)) { in nft_rule_expr_deactivate()
339 nf_tables_delrule_deactivate(struct nft_ctx *ctx, struct nft_rule *rule) in nf_tables_delrule_deactivate() argument
342 if (nft_is_active_next(ctx->net, rule)) { in nf_tables_delrule_deactivate()
343 nft_deactivate_next(ctx->net, rule); in nf_tables_delrule_deactivate()
351 struct nft_rule *rule) in nft_trans_rule_add() argument
[all …]
Dnf_tables_trace.c145 if (!info->rule) in nf_trace_fill_rule_info()
158 cpu_to_be64(info->rule->handle), in nf_trace_fill_rule_info()
Dnf_dup_netdev.c67 entry = &flow->rule->action.entries[ctx->num_actions++]; in nft_fwd_dup_netdev_offload()
Dnft_immediate.c135 entry = &flow->rule->action.entries[ctx->num_actions++]; in nft_immediate_offload_verdict()
DKconfig451 rule-set. It also comes with the generic set infrastructure that
503 include packet and byte counters in a rule.
512 ratelimit rule matchings per connections.
524 ratelimit rule matchings.
890 resets the timer associated with label specified when the rule is
1064 will log every rule which match the packets as those traverse
1099 Workaround: activate this option and add a rule to your firewall
1306 with a single rule.
1378 limit matching allows you to control the rate at which a rule can be
1407 a series of source or destination ports: normally a rule can only
/net/sched/
Dcls_matchall.c92 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts)); in mall_replace_hw_filter()
93 if (!cls_mall.rule) in mall_replace_hw_filter()
100 err = tc_setup_flow_action(&cls_mall.rule->action, &head->exts, true); in mall_replace_hw_filter()
102 kfree(cls_mall.rule); in mall_replace_hw_filter()
114 tc_cleanup_flow_action(&cls_mall.rule->action); in mall_replace_hw_filter()
115 kfree(cls_mall.rule); in mall_replace_hw_filter()
296 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts)); in mall_reoffload()
297 if (!cls_mall.rule) in mall_reoffload()
305 err = tc_setup_flow_action(&cls_mall.rule->action, &head->exts, true); in mall_reoffload()
307 kfree(cls_mall.rule); in mall_reoffload()
[all …]
Dcls_flower.c438 cls_flower.rule = flow_rule_alloc(tcf_exts_num_actions(&f->exts)); in fl_hw_replace_filter()
439 if (!cls_flower.rule) in fl_hw_replace_filter()
445 cls_flower.rule->match.dissector = &f->mask->dissector; in fl_hw_replace_filter()
446 cls_flower.rule->match.mask = &f->mask->key; in fl_hw_replace_filter()
447 cls_flower.rule->match.key = &f->mkey; in fl_hw_replace_filter()
450 err = tc_setup_flow_action(&cls_flower.rule->action, &f->exts, in fl_hw_replace_filter()
453 kfree(cls_flower.rule); in fl_hw_replace_filter()
463 tc_cleanup_flow_action(&cls_flower.rule->action); in fl_hw_replace_filter()
464 kfree(cls_flower.rule); in fl_hw_replace_filter()
1835 cls_flower.rule = in fl_reoffload()
[all …]
/net/wireless/
Dreg.c641 static bool valid_wmm(struct fwdb_wmm_rule *rule) in valid_wmm() argument
643 struct fwdb_wmm_ac *ac = (struct fwdb_wmm_ac *)rule; in valid_wmm()
663 struct fwdb_rule *rule = (void *)(data + (rule_ptr << 2)); in valid_rule() local
665 if ((u8 *)rule + sizeof(rule->len) > data + size) in valid_rule()
669 if (rule->len < offsetofend(struct fwdb_rule, max_bw)) in valid_rule()
671 if (rule->len >= offsetofend(struct fwdb_rule, wmm_ptr)) { in valid_rule()
672 u32 wmm_ptr = be16_to_cpu(rule->wmm_ptr) << 2; in valid_rule()
859 const struct fwdb_rule *rule, in set_wmm_rule() argument
866 wmm_ptr = be16_to_cpu(rule->wmm_ptr) << 2; in set_wmm_rule()
871 be32_to_cpu(rule->start), be32_to_cpu(rule->end), in set_wmm_rule()
[all …]
Dreg.h63 const struct ieee80211_reg_rule *rule);
Dnl80211.c893 const struct ieee80211_reg_rule *rule) in nl80211_msg_put_wmm_rules() argument
909 rule->wmm_rule.client[j].cw_min) || in nl80211_msg_put_wmm_rules()
911 rule->wmm_rule.client[j].cw_max) || in nl80211_msg_put_wmm_rules()
913 rule->wmm_rule.client[j].aifsn) || in nl80211_msg_put_wmm_rules()
915 rule->wmm_rule.client[j].cot)) in nl80211_msg_put_wmm_rules()
1005 const struct ieee80211_reg_rule *rule = in nl80211_msg_put_channel() local
1008 if (!IS_ERR_OR_NULL(rule) && rule->has_wmm) { in nl80211_msg_put_channel()
1009 if (nl80211_msg_put_wmm_rules(msg, rule)) in nl80211_msg_put_channel()
1557 struct nl80211_coalesce_rule_support rule; in nl80211_send_coalesce() local
1562 rule.max_rules = rdev->wiphy.coalesce->n_rules; in nl80211_send_coalesce()
[all …]
/net/ceph/crush/
Dcrush.c138 void crush_destroy_rule(struct crush_rule *rule) in crush_destroy_rule() argument
140 kfree(rule); in crush_destroy_rule()
Dmapper.c910 const struct crush_rule *rule; in crush_do_rule() local
936 rule = map->rules[ruleno]; in crush_do_rule()
939 for (step = 0; step < rule->len; step++) { in crush_do_rule()
941 const struct crush_rule_step *curstep = &rule->steps[step]; in crush_do_rule()
/net/bridge/netfilter/
DKconfig133 the rate at which a rule can be matched. This match is the
225 This option adds the log watcher, that you can use in any rule
239 This option adds the nflog watcher, that you can use in any rule
/net/ipv6/netfilter/
DKconfig207 The REJECT target allows a filtering rule to specify that an ICMPv6
/net/dsa/
Dslave.c879 if (!flow_offload_has_one_action(&cls->rule->action)) in dsa_slave_add_cls_matchall()
882 act = &cls->rule->action.entries[0]; in dsa_slave_add_cls_matchall()
/net/ipv4/netfilter/
DKconfig191 The REJECT target allows a filtering rule to specify that an ICMP

12