Lines Matching refs:r
165 const struct rtmsg *r) in dn_fib_get_nhs() argument
176 nh->nh_flags = (r->rtm_flags&~0xFF) | nhp->rtnh_flags; in dn_fib_get_nhs()
195 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
206 if (r->rtm_scope >= RT_SCOPE_LINK) in dn_fib_check_nh()
223 fld.flowidn_scope = r->rtm_scope + 1; in dn_fib_check_nh()
267 struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct nlattr *attrs[], in dn_fib_create_info() argument
275 if (r->rtm_type > RTN_MAX) in dn_fib_create_info()
278 if (dn_fib_props[r->rtm_type].scope > r->rtm_scope) in dn_fib_create_info()
290 fi->fib_protocol = r->rtm_protocol; in dn_fib_create_info()
292 fi->fib_flags = r->rtm_flags; in dn_fib_create_info()
318 if ((err = dn_fib_get_nhs(fi, attrs[RTA_MULTIPATH], r)) != 0) in dn_fib_create_info()
337 nh->nh_flags = r->rtm_flags; in dn_fib_create_info()
341 if (r->rtm_type == RTN_NAT) { in dn_fib_create_info()
349 if (dn_fib_props[r->rtm_type].error) { in dn_fib_create_info()
356 if (r->rtm_scope > RT_SCOPE_HOST) in dn_fib_create_info()
359 if (r->rtm_scope == RT_SCOPE_HOST) { in dn_fib_create_info()
372 if ((err = dn_fib_check_nh(r, fi, nh)) != 0) in dn_fib_create_info()
378 if (r->rtm_type != RTN_LOCAL || !attrs[RTA_DST] || in dn_fib_create_info()
510 struct rtmsg *r = nlmsg_data(nlh); in dn_fib_rtm_delroute() local
520 err = nlmsg_parse_deprecated(nlh, sizeof(*r), attrs, RTA_MAX, in dn_fib_rtm_delroute()
525 tb = dn_fib_get_table(rtm_get_table(attrs, r->rtm_table), 0); in dn_fib_rtm_delroute()
529 return tb->delete(tb, r, attrs, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_delroute()
537 struct rtmsg *r = nlmsg_data(nlh); in dn_fib_rtm_newroute() local
547 err = nlmsg_parse_deprecated(nlh, sizeof(*r), attrs, RTA_MAX, in dn_fib_rtm_newroute()
552 tb = dn_fib_get_table(rtm_get_table(attrs, r->rtm_table), 1); in dn_fib_rtm_newroute()
556 return tb->insert(tb, r, attrs, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_newroute()