Lines Matching refs:rule6
189 struct fib6_rule *rule6 = (struct fib6_rule *) rule; in fib6_rule_configure() local
202 rule6->src.addr = nla_get_in6_addr(tb[FRA_SRC]); in fib6_rule_configure()
205 rule6->dst.addr = nla_get_in6_addr(tb[FRA_DST]); in fib6_rule_configure()
207 rule6->src.plen = frh->src_len; in fib6_rule_configure()
208 rule6->dst.plen = frh->dst_len; in fib6_rule_configure()
209 rule6->tclass = frh->tos; in fib6_rule_configure()
219 struct fib6_rule *rule6 = (struct fib6_rule *) rule; in fib6_rule_compare() local
221 if (frh->src_len && (rule6->src.plen != frh->src_len)) in fib6_rule_compare()
224 if (frh->dst_len && (rule6->dst.plen != frh->dst_len)) in fib6_rule_compare()
227 if (frh->tos && (rule6->tclass != frh->tos)) in fib6_rule_compare()
231 nla_memcmp(tb[FRA_SRC], &rule6->src.addr, sizeof(struct in6_addr))) in fib6_rule_compare()
235 nla_memcmp(tb[FRA_DST], &rule6->dst.addr, sizeof(struct in6_addr))) in fib6_rule_compare()
244 struct fib6_rule *rule6 = (struct fib6_rule *) rule; in fib6_rule_fill() local
246 frh->dst_len = rule6->dst.plen; in fib6_rule_fill()
247 frh->src_len = rule6->src.plen; in fib6_rule_fill()
248 frh->tos = rule6->tclass; in fib6_rule_fill()
250 if ((rule6->dst.plen && in fib6_rule_fill()
251 nla_put_in6_addr(skb, FRA_DST, &rule6->dst.addr)) || in fib6_rule_fill()
252 (rule6->src.plen && in fib6_rule_fill()
253 nla_put_in6_addr(skb, FRA_SRC, &rule6->src.addr))) in fib6_rule_fill()