Lines Matching refs:r
164 const struct rtmsg *r) in dn_fib_get_nhs() argument
174 nh->nh_flags = (r->rtm_flags&~0xFF) | nhp->rtnh_flags; in dn_fib_get_nhs()
191 static int dn_fib_check_nh(const struct rtmsg *r, struct dn_fib_info *fi, struct dn_fib_nh *nh) in dn_fib_check_nh() argument
202 if (r->rtm_scope >= RT_SCOPE_LINK) in dn_fib_check_nh()
219 fld.flowidn_scope = r->rtm_scope + 1; in dn_fib_check_nh()
263 struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct nlattr *attrs[], in dn_fib_create_info() argument
271 if (r->rtm_type > RTN_MAX) in dn_fib_create_info()
274 if (dn_fib_props[r->rtm_type].scope > r->rtm_scope) in dn_fib_create_info()
286 fi->fib_protocol = r->rtm_protocol; in dn_fib_create_info()
288 fi->fib_flags = r->rtm_flags; in dn_fib_create_info()
313 if ((err = dn_fib_get_nhs(fi, attrs[RTA_MULTIPATH], r)) != 0) in dn_fib_create_info()
332 nh->nh_flags = r->rtm_flags; in dn_fib_create_info()
336 if (r->rtm_type == RTN_NAT) { in dn_fib_create_info()
344 if (dn_fib_props[r->rtm_type].error) { in dn_fib_create_info()
351 if (r->rtm_scope > RT_SCOPE_HOST) in dn_fib_create_info()
354 if (r->rtm_scope == RT_SCOPE_HOST) { in dn_fib_create_info()
367 if ((err = dn_fib_check_nh(r, fi, nh)) != 0) in dn_fib_create_info()
373 if (r->rtm_type != RTN_LOCAL || !attrs[RTA_DST] || in dn_fib_create_info()
504 struct rtmsg *r = nlmsg_data(nlh); in dn_fib_rtm_delroute() local
514 err = nlmsg_parse(nlh, sizeof(*r), attrs, RTA_MAX, rtm_dn_policy); in dn_fib_rtm_delroute()
518 tb = dn_fib_get_table(rtm_get_table(attrs, r->rtm_table), 0); in dn_fib_rtm_delroute()
522 return tb->delete(tb, r, attrs, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_delroute()
529 struct rtmsg *r = nlmsg_data(nlh); in dn_fib_rtm_newroute() local
539 err = nlmsg_parse(nlh, sizeof(*r), attrs, RTA_MAX, rtm_dn_policy); in dn_fib_rtm_newroute()
543 tb = dn_fib_get_table(rtm_get_table(attrs, r->rtm_table), 1); in dn_fib_rtm_newroute()
547 return tb->insert(tb, r, attrs, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_newroute()