| /net/core/ |
| A D | fib_rules.c | 41 rule->mark || rule->tun_id || rule->flags) in fib_rule_matchall() 353 arg->rule = rule; in fib_rules_lookup() 376 .rule = rule, in call_fib_rule_notifier() 391 .rule = rule, in call_fib_rule_notifiers() 449 if (rule->action && r->action != rule->action) in rule_find() 452 if (rule->table && r->table != rule->table) in rule_find() 466 if (rule->mark && r->mark != rule->mark) in rule_find() 480 if (rule->tun_id && r->tun_id != rule->tun_id) in rule_find() 483 if (rule->l3mdev && r->l3mdev != rule->l3mdev) in rule_find() 494 if (rule->proto && r->proto != rule->proto) in rule_find() [all …]
|
| A D | flow_offload.c | 12 struct flow_rule *rule; in flow_rule_alloc() local 15 rule = kzalloc(struct_size(rule, action.entries, num_actions), in flow_rule_alloc() 17 if (!rule) in flow_rule_alloc() 20 rule->action.num_entries = num_actions; in flow_rule_alloc() 27 return rule; in flow_rule_alloc() 58 void flow_rule_match_meta(const struct flow_rule *rule, in flow_rule_match_meta() argument 65 void flow_rule_match_basic(const struct flow_rule *rule, in flow_rule_match_basic() argument 86 void flow_rule_match_vlan(const struct flow_rule *rule, in flow_rule_match_vlan() argument 100 void flow_rule_match_arp(const struct flow_rule *rule, in flow_rule_match_arp() argument 121 void flow_rule_match_ip(const struct flow_rule *rule, in flow_rule_match_ip() argument [all …]
|
| /net/ipv4/ |
| A D | fib_rules.c | 57 return fib_rule_matchall(rule); in fib4_rule_matchall() 62 if (!fib4_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib4_rule_default() 63 rule->l3mdev) in fib4_rule_default() 65 if (rule->table != RT_TABLE_LOCAL && rule->table != RT_TABLE_MAIN && in fib4_rule_default() 97 if (arg.rule) in __fib_lookup() 118 switch (rule->action) { in fib4_rule_action() 168 if (rule->suppress_ifgroup != -1 && dev && dev->group == rule->suppress_ifgroup) in fib4_rule_suppress() 203 if (rule->ip_proto && (rule->ip_proto != fl4->flowi4_proto)) in fib4_rule_match() 206 if (!fib_rule_port_match(&rule->sport_range, rule->sport_mask, in fib4_rule_match() 210 if (!fib_rule_port_match(&rule->dport_range, rule->dport_mask, in fib4_rule_match() [all …]
|
| A D | ipmr.c | 182 static int ipmr_rule_action(struct fib_rule *rule, struct flowi *flp, in ipmr_rule_action() argument 188 switch (rule->action) { in ipmr_rule_action() 200 arg->table = fib_rule_get_table(rule, arg); in ipmr_rule_action() 202 mrt = __ipmr_get_table(rule->fr_net, arg->table); in ipmr_rule_action() 209 static int ipmr_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) in ipmr_rule_match() argument 214 static int ipmr_rule_configure(struct fib_rule *rule, struct sk_buff *skb, in ipmr_rule_configure() argument 221 static int ipmr_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, in ipmr_rule_compare() argument 227 static int ipmr_rule_fill(struct fib_rule *rule, struct sk_buff *skb, in ipmr_rule_fill() argument 306 bool ipmr_rule_default(const struct fib_rule *rule) in ipmr_rule_default() argument 308 return fib_rule_matchall(rule) && rule->table == RT_TABLE_DEFAULT; in ipmr_rule_default() [all …]
|
| /net/ipv6/ |
| A D | fib6_rules.c | 42 return fib_rule_matchall(rule); in fib6_rule_matchall() 47 if (!fib6_rule_matchall(rule) || rule->action != FR_ACT_TO_TBL || in fib6_rule_default() 48 rule->l3mdev) in fib6_rule_default() 50 if (rule->table != RT6_TABLE_LOCAL && rule->table != RT6_TABLE_MAIN) in fib6_rule_default() 172 switch (rule->action) { in fib6_rule_action_alt() 212 switch (rule->action) { in __fib6_rule_action() 301 if (rule->suppress_ifgroup != -1 && dev && dev->group == rule->suppress_ifgroup) in fib6_rule_suppress() 341 if (rule->ip_proto && (rule->ip_proto != fl6->flowi6_proto)) in fib6_rule_match() 344 if (!fib_rule_port_match(&rule->sport_range, rule->sport_mask, in fib6_rule_match() 348 if (!fib_rule_port_match(&rule->dport_range, rule->dport_mask, in fib6_rule_match() [all …]
|
| A D | ip6mr.c | 170 static int ip6mr_rule_action(struct fib_rule *rule, struct flowi *flp, in ip6mr_rule_action() argument 176 switch (rule->action) { in ip6mr_rule_action() 188 arg->table = fib_rule_get_table(rule, arg); in ip6mr_rule_action() 190 mrt = __ip6mr_get_table(rule->fr_net, arg->table); in ip6mr_rule_action() 197 static int ip6mr_rule_match(struct fib_rule *rule, struct flowi *flp, int flags) in ip6mr_rule_match() argument 202 static int ip6mr_rule_configure(struct fib_rule *rule, struct sk_buff *skb, in ip6mr_rule_configure() argument 209 static int ip6mr_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, in ip6mr_rule_compare() argument 215 static int ip6mr_rule_fill(struct fib_rule *rule, struct sk_buff *skb, in ip6mr_rule_fill() argument 294 bool ip6mr_rule_default(const struct fib_rule *rule) in ip6mr_rule_default() argument 296 return fib_rule_matchall(rule) && rule->action == FR_ACT_TO_TBL && in ip6mr_rule_default() [all …]
|
| /net/netfilter/ |
| A D | nf_tables_core.c | 43 const struct nft_rule_dp *rule, in __nft_trace_packet() argument 58 const struct nft_rule_dp *rule, in nft_trace_packet() argument 110 const struct nft_rule_dp *rule, in __nft_trace_verdict() argument 200 const struct nft_rule_dp *rule; member 240 #define nft_rule_expr_first(rule) (struct nft_expr *)&rule->data[0] argument 242 #define nft_rule_expr_last(rule) (struct nft_expr *)&rule->data[rule->dlen] argument 245 for ((expr) = nft_rule_expr_first(rule), (last) = nft_rule_expr_last(rule); \ 255 const struct nft_rule_dp *rule; in nft_do_chain() local 275 for (; !rule->is_last ; rule = nft_rule_next(rule)) { in nft_do_chain() 319 jumpstack[stackptr].rule = nft_rule_next(rule); in nft_do_chain() [all …]
|
| A D | nf_tables_offload.c | 19 if (!flow->rule) { in nft_flow_rule_alloc() 89 const struct nft_rule *rule) in nft_flow_rule_create() argument 96 expr = nft_expr_first(rule); in nft_flow_rule_create() 97 while (nft_expr_more(rule, expr)) { in nft_flow_rule_create() 112 expr = nft_expr_first(rule); in nft_flow_rule_create() 161 kfree(flow->rule); in nft_flow_rule_destroy() 265 cls_flow->rule = flow->rule; in nft_flow_cls_offload_setup() 269 const struct nft_rule *rule, in nft_flow_offload_cmd() argument 289 struct nft_rule *rule, in nft_flow_offload_rule() argument 299 const struct nft_rule *rule) in nft_flow_rule_stats() argument [all …]
|
| A D | nf_tables_trace.c | 175 const struct nft_rule_dp *rule, in nf_trace_fill_rule_info() argument 178 if (!rule || rule->is_last) in nf_trace_fill_rule_info() 191 cpu_to_be64(rule->handle), in nf_trace_fill_rule_info() 217 static const struct nft_chain *nft_trace_get_chain(const struct nft_rule_dp *rule, in nft_trace_get_chain() argument 222 if (!rule) in nft_trace_get_chain() 225 while (!rule->is_last) in nft_trace_get_chain() 226 rule = nft_rule_next(rule); in nft_trace_get_chain() 228 last = (const struct nft_rule_dp_last *)rule; in nft_trace_get_chain() 238 const struct nft_rule_dp *rule, in nft_trace_notify() argument 251 chain = nft_trace_get_chain(rule, info); in nft_trace_notify() [all …]
|
| A D | nft_immediate.c | 102 struct nft_rule *rule; in nft_immediate_activate() local 115 list_for_each_entry(rule, &chain->rules, list) in nft_immediate_activate() 116 nft_rule_expr_activate(&chain_ctx, rule); in nft_immediate_activate() 133 struct nft_rule *rule; in nft_immediate_chain_deactivate() local 138 list_for_each_entry(rule, &chain->rules, list) in nft_immediate_chain_deactivate() 139 nft_rule_expr_deactivate(&chain_ctx, rule, phase); in nft_immediate_chain_deactivate() 191 struct nft_rule *rule, *n; in nft_immediate_destroy() local 219 list_for_each_entry_safe(rule, n, &chain->rules, list) { in nft_immediate_destroy() 221 list_del(&rule->list); in nft_immediate_destroy() 222 nf_tables_rule_destroy(&chain_ctx, rule); in nft_immediate_destroy() [all …]
|
| A D | nf_flow_table_offload.c | 218 int i = flow_rule->rule->action.num_entries++; in flow_action_entry_next() 220 return &flow_rule->rule->action.entries[i]; in flow_action_entry_next() 747 flow_rule->rule = flow_rule_alloc(NF_FLOW_RULE_ACTION_MAX); in nf_flow_offload_rule_alloc() 748 if (!flow_rule->rule) in nf_flow_offload_rule_alloc() 752 flow_rule->rule->match.mask = &flow_rule->match.mask; in nf_flow_offload_rule_alloc() 753 flow_rule->rule->match.key = &flow_rule->match.key; in nf_flow_offload_rule_alloc() 764 flow_rule->rule->action.num_entries = 0; in nf_flow_offload_rule_alloc() 771 kfree(flow_rule->rule); in nf_flow_offload_rule_alloc() 784 entry = &flow_rule->rule->action.entries[i]; in __nf_flow_offload_destroy() 790 kfree(flow_rule->rule); in __nf_flow_offload_destroy() [all …]
|
| A D | nf_tables_api.c | 728 struct nft_rule *rule; in nft_delrule_by_chain() local 3607 return rule; in __nft_rule_lookup() 3683 if (rule->udata) { in nf_tables_fill_rule_info() 3796 prule = rule; in __nf_tables_dump_rules() 3949 if (IS_ERR(rule)) { in nf_tables_getrule_single() 4054 kfree(rule); in nf_tables_rule_destroy() 4251 if (IS_ERR(rule)) { in nf_tables_newrule() 4261 old_rule = rule; in nf_tables_newrule() 4324 rule = kzalloc(sizeof(*rule) + size + usize, GFP_KERNEL_ACCOUNT); in nf_tables_newrule() 4325 if (rule == NULL) in nf_tables_newrule() [all …]
|
| A D | nf_dup_netdev.c | 98 entry = &flow->rule->action.entries[ctx->num_actions++]; in nft_fwd_dup_netdev_offload()
|
| A D | nft_set_pipapo.c | 729 static void pipapo_bucket_set(struct nft_pipapo_field *f, int rule, int group, in pipapo_bucket_set() argument 738 __set_bit(rule, pos); in pipapo_bucket_set() 939 unsigned int rule = f->rules, group, ret, bit_offset = 0; in pipapo_insert() local 960 pipapo_bucket_set(f, rule, group, v); in pipapo_insert() 964 pipapo_bucket_set(f, rule, group, i); in pipapo_insert() 971 pipapo_bucket_set(f, rule, group, i); in pipapo_insert()
|
| A D | Kconfig | 476 rule-set. It also comes with the generic set infrastructure that 529 ratelimit rule matchings per connections. 541 ratelimit rule matchings. 938 resets the timer associated with label specified when the rule is 1111 will log every rule which match the packets as those traverse 1146 Workaround: activate this option and add a rule to your firewall 1353 with a single rule. 1425 limit matching allows you to control the rate at which a rule can be 1454 a series of source or destination ports: normally a rule can only
|
| /net/sched/ |
| A D | cls_matchall.c | 94 cls_mall.rule = flow_rule_alloc(tcf_exts_num_actions(&head->exts)); in mall_replace_hw_filter() 95 if (!cls_mall.rule) in mall_replace_hw_filter() 102 err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts, in mall_replace_hw_filter() 105 kfree(cls_mall.rule); in mall_replace_hw_filter() 113 tc_cleanup_offload_action(&cls_mall.rule->action); in mall_replace_hw_filter() 114 kfree(cls_mall.rule); in mall_replace_hw_filter() 287 if (!cls_mall.rule) in mall_reoffload() 295 err = tc_setup_offload_action(&cls_mall.rule->action, &head->exts, in mall_reoffload() 298 kfree(cls_mall.rule); in mall_reoffload() 306 tc_cleanup_offload_action(&cls_mall.rule->action); in mall_reoffload() [all …]
|
| A D | cls_flower.c | 473 if (!cls_flower.rule) in fl_hw_replace_filter() 487 kfree(cls_flower.rule); in fl_hw_replace_filter() 495 kfree(cls_flower.rule); in fl_hw_replace_filter() 2696 cls_flower.rule = in fl_reoffload() 2698 if (!cls_flower.rule) { in fl_reoffload() 2715 kfree(cls_flower.rule); in fl_reoffload() 2730 kfree(cls_flower.rule); in fl_reoffload() 2774 if (!cls_flower.rule) in fl_hw_create_tmplt() 2788 kfree(cls_flower.rule); in fl_hw_create_tmplt() 2868 if (!cls_flower.rule) in fl_tmplt_reoffload() [all …]
|
| /net/wireless/ |
| A D | reg.c | 688 if ((u8 *)rule + sizeof(rule->len) > data + size) in valid_rule() 846 const struct fwdb_rule *rule, in set_wmm_rule() argument 858 be32_to_cpu(rule->start), be32_to_cpu(rule->end), in set_wmm_rule() 960 if (rule->flags & FWDB_FLAG_NO_OFDM) in regdb_query_country() 964 if (rule->flags & FWDB_FLAG_DFS) in regdb_query_country() 966 if (rule->flags & FWDB_FLAG_NO_IR) in regdb_query_country() 1171 if (rule == &rd->reg_rules[idx]) in reg_get_max_bandwidth_from_range() 1193 freq_range = &rule->freq_range; in reg_get_max_bandwidth_from_range() 1471 if (rule_contains(tmp_rule, rule)) in add_rule() 1476 memcpy(tmp_rule, rule, sizeof(*rule)); in add_rule() [all …]
|
| A D | reg.h | 63 const struct ieee80211_reg_rule *rule);
|
| A D | nl80211.c | 1272 if (!IS_ERR_OR_NULL(rule) && rule->has_wmm) { in nl80211_msg_put_channel() 1882 if (nla_put(msg, NL80211_ATTR_COALESCE_RULE, sizeof(rule), &rule)) in nl80211_send_coalesce() 14682 rule = &rdev->coalesce->rules[i]; in nl80211_send_coalesce_rules() 14684 rule->delay)) in nl80211_send_coalesce_rules() 14688 rule->condition)) in nl80211_send_coalesce_rules() 14703 rule->patterns[j].mask) || in nl80211_send_coalesce_rules() 14757 rule = &coalesce->rules[i]; in cfg80211_free_coalesce() 14759 kfree(rule->patterns[j].mask); in cfg80211_free_coalesce() 14760 kfree(rule->patterns); in cfg80211_free_coalesce() 14766 struct nlattr *rule, in nl80211_parse_coalesce_rule() argument [all …]
|
| /net/ceph/crush/ |
| A D | crush.c | 139 void crush_destroy_rule(struct crush_rule *rule) in crush_destroy_rule() argument 141 kfree(rule); in crush_destroy_rule()
|
| A D | mapper.c | 912 const struct crush_rule *rule; in crush_do_rule() local 938 rule = map->rules[ruleno]; in crush_do_rule() 941 for (step = 0; step < rule->len; step++) { in crush_do_rule() 943 const struct crush_rule_step *curstep = &rule->steps[step]; in crush_do_rule()
|
| /net/bridge/netfilter/ |
| A D | Kconfig | 145 the rate at which a rule can be matched. This match is the 237 This option adds the log watcher, that you can use in any rule 251 This option adds the nflog watcher, that you can use in any rule
|
| /net/ethtool/ |
| A D | ioctl.c | 3564 flow->rule = flow_rule_alloc(1); in ethtool_rx_flow_rule_create() 3565 if (!flow->rule) { in ethtool_rx_flow_rule_create() 3571 flow->rule->match.dissector = &match->dissector; in ethtool_rx_flow_rule_create() 3572 flow->rule->match.mask = &match->mask; in ethtool_rx_flow_rule_create() 3573 flow->rule->match.key = &match->key; in ethtool_rx_flow_rule_create() 3774 act = &flow->rule->action.entries[0]; in ethtool_rx_flow_rule_create() 3798 kfree(flow->rule); in ethtool_rx_flow_rule_destroy()
|
| /net/dsa/ |
| A D | user.c | 1394 if (!flow_action_basic_hw_stats_check(&cls->rule->action, extack)) in dsa_user_add_cls_matchall_mirred() 1397 act = &cls->rule->action.entries[0]; in dsa_user_add_cls_matchall_mirred() 1480 if (!flow_action_basic_hw_stats_check(&cls->rule->action, extack)) in dsa_user_add_cls_matchall_police() 1491 act = &cls->rule->action.entries[0]; in dsa_user_add_cls_matchall_police() 1518 const struct flow_action *action = &cls->rule->action; in dsa_user_add_cls_matchall()
|