Lines Matching refs:rule6
200 struct fib6_rule *rule6 = (struct fib6_rule *) rule; in fib6_rule_configure() local
213 rule6->src.addr = nla_get_in6_addr(tb[FRA_SRC]); in fib6_rule_configure()
216 rule6->dst.addr = nla_get_in6_addr(tb[FRA_DST]); in fib6_rule_configure()
218 rule6->src.plen = frh->src_len; in fib6_rule_configure()
219 rule6->dst.plen = frh->dst_len; in fib6_rule_configure()
220 rule6->tclass = frh->tos; in fib6_rule_configure()
230 struct fib6_rule *rule6 = (struct fib6_rule *) rule; in fib6_rule_compare() local
232 if (frh->src_len && (rule6->src.plen != frh->src_len)) in fib6_rule_compare()
235 if (frh->dst_len && (rule6->dst.plen != frh->dst_len)) in fib6_rule_compare()
238 if (frh->tos && (rule6->tclass != frh->tos)) in fib6_rule_compare()
242 nla_memcmp(tb[FRA_SRC], &rule6->src.addr, sizeof(struct in6_addr))) in fib6_rule_compare()
246 nla_memcmp(tb[FRA_DST], &rule6->dst.addr, sizeof(struct in6_addr))) in fib6_rule_compare()
255 struct fib6_rule *rule6 = (struct fib6_rule *) rule; in fib6_rule_fill() local
257 frh->dst_len = rule6->dst.plen; in fib6_rule_fill()
258 frh->src_len = rule6->src.plen; in fib6_rule_fill()
259 frh->tos = rule6->tclass; in fib6_rule_fill()
261 if ((rule6->dst.plen && in fib6_rule_fill()
262 nla_put_in6_addr(skb, FRA_DST, &rule6->dst.addr)) || in fib6_rule_fill()
263 (rule6->src.plen && in fib6_rule_fill()
264 nla_put_in6_addr(skb, FRA_SRC, &rule6->src.addr))) in fib6_rule_fill()