Lines Matching refs:rule4
227 struct fib4_rule *rule4 = (struct fib4_rule *) rule; in fib4_rule_configure() local
239 rule4->dscp = inet_dsfield_to_dscp(frh->tos); in fib4_rule_configure()
261 rule4->src = nla_get_in_addr(tb[FRA_SRC]); in fib4_rule_configure()
264 rule4->dst = nla_get_in_addr(tb[FRA_DST]); in fib4_rule_configure()
268 rule4->tclassid = nla_get_u32(tb[FRA_FLOW]); in fib4_rule_configure()
269 if (rule4->tclassid) in fib4_rule_configure()
277 rule4->src_len = frh->src_len; in fib4_rule_configure()
278 rule4->srcmask = inet_make_mask(rule4->src_len); in fib4_rule_configure()
279 rule4->dst_len = frh->dst_len; in fib4_rule_configure()
280 rule4->dstmask = inet_make_mask(rule4->dst_len); in fib4_rule_configure()
315 struct fib4_rule *rule4 = (struct fib4_rule *) rule; in fib4_rule_compare() local
317 if (frh->src_len && (rule4->src_len != frh->src_len)) in fib4_rule_compare()
320 if (frh->dst_len && (rule4->dst_len != frh->dst_len)) in fib4_rule_compare()
323 if (frh->tos && inet_dscp_to_dsfield(rule4->dscp) != frh->tos) in fib4_rule_compare()
327 if (tb[FRA_FLOW] && (rule4->tclassid != nla_get_u32(tb[FRA_FLOW]))) in fib4_rule_compare()
331 if (frh->src_len && (rule4->src != nla_get_in_addr(tb[FRA_SRC]))) in fib4_rule_compare()
334 if (frh->dst_len && (rule4->dst != nla_get_in_addr(tb[FRA_DST]))) in fib4_rule_compare()
343 struct fib4_rule *rule4 = (struct fib4_rule *) rule; in fib4_rule_fill() local
345 frh->dst_len = rule4->dst_len; in fib4_rule_fill()
346 frh->src_len = rule4->src_len; in fib4_rule_fill()
347 frh->tos = inet_dscp_to_dsfield(rule4->dscp); in fib4_rule_fill()
349 if ((rule4->dst_len && in fib4_rule_fill()
350 nla_put_in_addr(skb, FRA_DST, rule4->dst)) || in fib4_rule_fill()
351 (rule4->src_len && in fib4_rule_fill()
352 nla_put_in_addr(skb, FRA_SRC, rule4->src))) in fib4_rule_fill()
355 if (rule4->tclassid && in fib4_rule_fill()
356 nla_put_u32(skb, FRA_FLOW, rule4->tclassid)) in fib4_rule_fill()