• Home
  • Raw
  • Download

Lines Matching refs:r

174 static int dn_fib_get_nhs(struct dn_fib_info *fi, const struct rtattr *rta, const struct rtmsg *r)  in dn_fib_get_nhs()  argument
184 nh->nh_flags = (r->rtm_flags&~0xFF) | nhp->rtnh_flags; in dn_fib_get_nhs()
198 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
209 if (r->rtm_scope >= RT_SCOPE_LINK) in dn_fib_check_nh()
226 fl.fld_scope = r->rtm_scope + 1; in dn_fib_check_nh()
270 struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct dn_kern_rta *rta, const struct… in dn_fib_create_info() argument
277 if (r->rtm_type > RTN_MAX) in dn_fib_create_info()
280 if (dn_fib_props[r->rtm_type].scope > r->rtm_scope) in dn_fib_create_info()
294 fi->fib_protocol = r->rtm_protocol; in dn_fib_create_info()
296 fi->fib_flags = r->rtm_flags; in dn_fib_create_info()
317 if ((err = dn_fib_get_nhs(fi, rta->rta_mp, r)) != 0) in dn_fib_create_info()
329 nh->nh_flags = r->rtm_flags; in dn_fib_create_info()
333 if (r->rtm_type == RTN_NAT) { in dn_fib_create_info()
340 if (dn_fib_props[r->rtm_type].error) { in dn_fib_create_info()
346 if (r->rtm_scope > RT_SCOPE_HOST) in dn_fib_create_info()
349 if (r->rtm_scope == RT_SCOPE_HOST) { in dn_fib_create_info()
362 if ((err = dn_fib_check_nh(r, fi, nh)) != 0) in dn_fib_create_info()
368 if (r->rtm_type != RTN_LOCAL || rta->rta_dst == NULL || in dn_fib_create_info()
487 static int dn_fib_check_attr(struct rtmsg *r, struct rtattr **rta) in dn_fib_check_attr() argument
510 struct rtmsg *r = NLMSG_DATA(nlh); in dn_fib_rtm_delroute() local
515 if (dn_fib_check_attr(r, rta)) in dn_fib_rtm_delroute()
518 tb = dn_fib_get_table(rtm_get_table(rta, r->rtm_table), 0); in dn_fib_rtm_delroute()
520 return tb->delete(tb, r, (struct dn_kern_rta *)rta, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_delroute()
530 struct rtmsg *r = NLMSG_DATA(nlh); in dn_fib_rtm_newroute() local
535 if (dn_fib_check_attr(r, rta)) in dn_fib_rtm_newroute()
538 tb = dn_fib_get_table(rtm_get_table(rta, r->rtm_table), 1); in dn_fib_rtm_newroute()
540 return tb->insert(tb, r, (struct dn_kern_rta *)rta, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_newroute()