Lines Matching refs:rtm
4911 struct rtmsg *rtm;
4916 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
4922 rtm = nlmsg_data(nlh);
4925 .fc_table = rtm->rtm_table,
4926 .fc_dst_len = rtm->rtm_dst_len,
4927 .fc_src_len = rtm->rtm_src_len,
4929 .fc_protocol = rtm->rtm_protocol,
4930 .fc_type = rtm->rtm_type,
4937 if (rtm->rtm_type == RTN_UNREACHABLE ||
4938 rtm->rtm_type == RTN_BLACKHOLE ||
4939 rtm->rtm_type == RTN_PROHIBIT ||
4940 rtm->rtm_type == RTN_THROW)
4943 if (rtm->rtm_type == RTN_LOCAL)
4946 if (rtm->rtm_flags & RTM_F_CLONED)
4949 cfg->fc_flags |= (rtm->rtm_flags & RTNH_F_ONLINK);
4971 int plen = (rtm->rtm_dst_len + 7) >> 3;
4980 int plen = (rtm->rtm_src_len + 7) >> 3;
5512 struct rtmsg *rtm;
5515 nlh = nlmsg_put(skb, portid, seq, type, sizeof(*rtm), flags);
5529 rtm = nlmsg_data(nlh);
5530 rtm->rtm_family = AF_INET6;
5531 rtm->rtm_dst_len = rt6_dst->plen;
5532 rtm->rtm_src_len = rt6_src->plen;
5533 rtm->rtm_tos = 0;
5538 rtm->rtm_table = table < 256 ? table : RT_TABLE_COMPAT;
5542 rtm->rtm_type = rt->fib6_type;
5543 rtm->rtm_flags = 0;
5544 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
5545 rtm->rtm_protocol = rt->fib6_protocol;
5548 rtm->rtm_flags |= RTM_F_CLONED;
5553 rtm->rtm_dst_len = 128;
5554 } else if (rtm->rtm_dst_len)
5561 rtm->rtm_src_len = 128;
5562 } else if (rtm->rtm_src_len &&
5569 int err = ip6mr_get_route(net, skb, rtm, portid);
5637 rtm->rtm_type = RTN_BLACKHOLE;
5643 rtm->rtm_flags |= nh_flags;
5649 rtm->rtm_flags |= nh_flags;
5659 rtm->rtm_flags |= RTM_F_OFFLOAD;
5661 rtm->rtm_flags |= RTM_F_TRAP;
5848 struct rtmsg *rtm;
5851 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) {
5858 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
5861 rtm = nlmsg_data(nlh);
5862 if ((rtm->rtm_src_len && rtm->rtm_src_len != 128) ||
5863 (rtm->rtm_dst_len && rtm->rtm_dst_len != 128) ||
5864 rtm->rtm_table || rtm->rtm_protocol || rtm->rtm_scope ||
5865 rtm->rtm_type) {
5869 if (rtm->rtm_flags & ~RTM_F_FIB_MATCH) {
5875 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX,
5880 if ((tb[RTA_SRC] && !rtm->rtm_src_len) ||
5881 (tb[RTA_DST] && !rtm->rtm_dst_len)) {
5920 struct rtmsg *rtm;
5929 rtm = nlmsg_data(nlh);
5930 fl6.flowlabel = ip6_make_flowinfo(rtm->rtm_tos, 0);
5931 fibmatch = !!(rtm->rtm_flags & RTM_F_FIB_MATCH);