Lines Matching refs:frh
418 struct fib_rule_hdr *frh, in rule_find() argument
487 if (!ops->compare(r, frh, tb)) in rule_find()
524 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl2rule() local
528 if (frh->src_len) in fib_nl2rule()
530 frh->src_len > (ops->addr_size * 8) || in fib_nl2rule()
536 if (frh->dst_len) in fib_nl2rule()
538 frh->dst_len > (ops->addr_size * 8) || in fib_nl2rule()
602 nlrule->action = frh->action; in fib_nl2rule()
603 nlrule->flags = frh->flags; in fib_nl2rule()
604 nlrule->table = frh_get_table(frh, tb); in fib_nl2rule()
686 static int rule_exists(struct fib_rules_ops *ops, struct fib_rule_hdr *frh, in rule_exists() argument
746 if (!ops->compare(r, frh, tb)) in rule_exists()
778 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl_newrule() local
785 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*frh))) { in fib_nl_newrule()
790 ops = lookup_rules_ops(net, frh->family); in fib_nl_newrule()
797 err = nlmsg_parse_deprecated(nlh, sizeof(*frh), tb, FRA_MAX, in fib_nl_newrule()
809 rule_exists(ops, frh, tb, rule)) { in fib_nl_newrule()
814 err = ops->configure(rule, skb, frh, tb, extack); in fib_nl_newrule()
886 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl_delrule() local
893 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*frh))) { in fib_nl_delrule()
898 ops = lookup_rules_ops(net, frh->family); in fib_nl_delrule()
905 err = nlmsg_parse_deprecated(nlh, sizeof(*frh), tb, FRA_MAX, in fib_nl_delrule()
916 rule = rule_find(ops, frh, tb, nlrule, user_priority); in fib_nl_delrule()
1013 struct fib_rule_hdr *frh; in fib_nl_fill_rule() local
1015 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*frh), flags); in fib_nl_fill_rule()
1019 frh = nlmsg_data(nlh); in fib_nl_fill_rule()
1020 frh->family = ops->family; in fib_nl_fill_rule()
1021 frh->table = rule->table < 256 ? rule->table : RT_TABLE_COMPAT; in fib_nl_fill_rule()
1026 frh->res1 = 0; in fib_nl_fill_rule()
1027 frh->res2 = 0; in fib_nl_fill_rule()
1028 frh->action = rule->action; in fib_nl_fill_rule()
1029 frh->flags = rule->flags; in fib_nl_fill_rule()
1036 frh->flags |= FIB_RULE_UNRESOLVED; in fib_nl_fill_rule()
1042 frh->flags |= FIB_RULE_IIF_DETACHED; in fib_nl_fill_rule()
1049 frh->flags |= FIB_RULE_OIF_DETACHED; in fib_nl_fill_rule()
1078 if (ops->fill(rule, skb, frh) < 0) in fib_nl_fill_rule()
1119 struct fib_rule_hdr *frh; in fib_valid_dumprule_req() local
1121 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*frh))) { in fib_valid_dumprule_req()
1126 frh = nlmsg_data(nlh); in fib_valid_dumprule_req()
1127 if (frh->dst_len || frh->src_len || frh->tos || frh->table || in fib_valid_dumprule_req()
1128 frh->res1 || frh->res2 || frh->action || frh->flags) { in fib_valid_dumprule_req()
1134 if (nlmsg_attrlen(nlh, sizeof(*frh))) { in fib_valid_dumprule_req()