Lines Matching refs:rtm
4998 struct rtmsg *rtm;
5003 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
5009 rtm = nlmsg_data(nlh);
5011 if (rtm->rtm_tos) {
5018 .fc_table = rtm->rtm_table,
5019 .fc_dst_len = rtm->rtm_dst_len,
5020 .fc_src_len = rtm->rtm_src_len,
5022 .fc_protocol = rtm->rtm_protocol,
5023 .fc_type = rtm->rtm_type,
5030 if (rtm->rtm_type == RTN_UNREACHABLE ||
5031 rtm->rtm_type == RTN_BLACKHOLE ||
5032 rtm->rtm_type == RTN_PROHIBIT ||
5033 rtm->rtm_type == RTN_THROW)
5036 if (rtm->rtm_type == RTN_LOCAL)
5039 if (rtm->rtm_flags & RTM_F_CLONED)
5042 cfg->fc_flags |= (rtm->rtm_flags & RTNH_F_ONLINK);
5064 int plen = (rtm->rtm_dst_len + 7) >> 3;
5073 int plen = (rtm->rtm_src_len + 7) >> 3;
5605 struct rtmsg *rtm;
5608 nlh = nlmsg_put(skb, portid, seq, type, sizeof(*rtm), flags);
5622 rtm = nlmsg_data(nlh);
5623 rtm->rtm_family = AF_INET6;
5624 rtm->rtm_dst_len = rt6_dst->plen;
5625 rtm->rtm_src_len = rt6_src->plen;
5626 rtm->rtm_tos = 0;
5631 rtm->rtm_table = table < 256 ? table : RT_TABLE_COMPAT;
5635 rtm->rtm_type = rt->fib6_type;
5636 rtm->rtm_flags = 0;
5637 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
5638 rtm->rtm_protocol = rt->fib6_protocol;
5641 rtm->rtm_flags |= RTM_F_CLONED;
5646 rtm->rtm_dst_len = 128;
5647 } else if (rtm->rtm_dst_len)
5654 rtm->rtm_src_len = 128;
5655 } else if (rtm->rtm_src_len &&
5662 int err = ip6mr_get_route(net, skb, rtm, portid);
5734 rtm->rtm_type = RTN_BLACKHOLE;
5740 rtm->rtm_flags |= nh_flags;
5746 rtm->rtm_flags |= nh_flags;
5756 rtm->rtm_flags |= RTM_F_OFFLOAD;
5758 rtm->rtm_flags |= RTM_F_TRAP;
5760 rtm->rtm_flags |= RTM_F_OFFLOAD_FAILED;
5947 struct rtmsg *rtm;
5950 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) {
5957 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
5960 rtm = nlmsg_data(nlh);
5961 if ((rtm->rtm_src_len && rtm->rtm_src_len != 128) ||
5962 (rtm->rtm_dst_len && rtm->rtm_dst_len != 128) ||
5963 rtm->rtm_table || rtm->rtm_protocol || rtm->rtm_scope ||
5964 rtm->rtm_type) {
5968 if (rtm->rtm_flags & ~RTM_F_FIB_MATCH) {
5974 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX,
5979 if ((tb[RTA_SRC] && !rtm->rtm_src_len) ||
5980 (tb[RTA_DST] && !rtm->rtm_dst_len)) {
6019 struct rtmsg *rtm;
6028 rtm = nlmsg_data(nlh);
6029 fl6.flowlabel = ip6_make_flowinfo(rtm->rtm_tos, 0);
6030 fibmatch = !!(rtm->rtm_flags & RTM_F_FIB_MATCH);