Lines Matching refs:rtm
4998 struct rtmsg *rtm; in rtm_to_fib6_config() local
5003 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in rtm_to_fib6_config()
5009 rtm = nlmsg_data(nlh); in rtm_to_fib6_config()
5012 .fc_table = rtm->rtm_table, in rtm_to_fib6_config()
5013 .fc_dst_len = rtm->rtm_dst_len, in rtm_to_fib6_config()
5014 .fc_src_len = rtm->rtm_src_len, in rtm_to_fib6_config()
5016 .fc_protocol = rtm->rtm_protocol, in rtm_to_fib6_config()
5017 .fc_type = rtm->rtm_type, in rtm_to_fib6_config()
5024 if (rtm->rtm_type == RTN_UNREACHABLE || in rtm_to_fib6_config()
5025 rtm->rtm_type == RTN_BLACKHOLE || in rtm_to_fib6_config()
5026 rtm->rtm_type == RTN_PROHIBIT || in rtm_to_fib6_config()
5027 rtm->rtm_type == RTN_THROW) in rtm_to_fib6_config()
5030 if (rtm->rtm_type == RTN_LOCAL) in rtm_to_fib6_config()
5033 if (rtm->rtm_flags & RTM_F_CLONED) in rtm_to_fib6_config()
5036 cfg->fc_flags |= (rtm->rtm_flags & RTNH_F_ONLINK); in rtm_to_fib6_config()
5058 int plen = (rtm->rtm_dst_len + 7) >> 3; in rtm_to_fib6_config()
5067 int plen = (rtm->rtm_src_len + 7) >> 3; in rtm_to_fib6_config()
5606 struct rtmsg *rtm; in rt6_fill_node() local
5609 nlh = nlmsg_put(skb, portid, seq, type, sizeof(*rtm), flags); in rt6_fill_node()
5623 rtm = nlmsg_data(nlh); in rt6_fill_node()
5624 rtm->rtm_family = AF_INET6; in rt6_fill_node()
5625 rtm->rtm_dst_len = rt6_dst->plen; in rt6_fill_node()
5626 rtm->rtm_src_len = rt6_src->plen; in rt6_fill_node()
5627 rtm->rtm_tos = 0; in rt6_fill_node()
5632 rtm->rtm_table = table < 256 ? table : RT_TABLE_COMPAT; in rt6_fill_node()
5636 rtm->rtm_type = rt->fib6_type; in rt6_fill_node()
5637 rtm->rtm_flags = 0; in rt6_fill_node()
5638 rtm->rtm_scope = RT_SCOPE_UNIVERSE; in rt6_fill_node()
5639 rtm->rtm_protocol = rt->fib6_protocol; in rt6_fill_node()
5642 rtm->rtm_flags |= RTM_F_CLONED; in rt6_fill_node()
5647 rtm->rtm_dst_len = 128; in rt6_fill_node()
5648 } else if (rtm->rtm_dst_len) in rt6_fill_node()
5655 rtm->rtm_src_len = 128; in rt6_fill_node()
5656 } else if (rtm->rtm_src_len && in rt6_fill_node()
5663 int err = ip6mr_get_route(net, skb, rtm, portid); in rt6_fill_node()
5735 rtm->rtm_type = RTN_BLACKHOLE; in rt6_fill_node()
5741 rtm->rtm_flags |= nh_flags; in rt6_fill_node()
5747 rtm->rtm_flags |= nh_flags; in rt6_fill_node()
5757 rtm->rtm_flags |= RTM_F_OFFLOAD; in rt6_fill_node()
5759 rtm->rtm_flags |= RTM_F_TRAP; in rt6_fill_node()
5761 rtm->rtm_flags |= RTM_F_OFFLOAD_FAILED; in rt6_fill_node()
5948 struct rtmsg *rtm; in inet6_rtm_valid_getroute_req() local
5951 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) { in inet6_rtm_valid_getroute_req()
5958 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX, in inet6_rtm_valid_getroute_req()
5961 rtm = nlmsg_data(nlh); in inet6_rtm_valid_getroute_req()
5962 if ((rtm->rtm_src_len && rtm->rtm_src_len != 128) || in inet6_rtm_valid_getroute_req()
5963 (rtm->rtm_dst_len && rtm->rtm_dst_len != 128) || in inet6_rtm_valid_getroute_req()
5964 rtm->rtm_table || rtm->rtm_protocol || rtm->rtm_scope || in inet6_rtm_valid_getroute_req()
5965 rtm->rtm_type) { in inet6_rtm_valid_getroute_req()
5969 if (rtm->rtm_flags & ~RTM_F_FIB_MATCH) { in inet6_rtm_valid_getroute_req()
5975 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX, in inet6_rtm_valid_getroute_req()
5980 if ((tb[RTA_SRC] && !rtm->rtm_src_len) || in inet6_rtm_valid_getroute_req()
5981 (tb[RTA_DST] && !rtm->rtm_dst_len)) { in inet6_rtm_valid_getroute_req()
6020 struct rtmsg *rtm; in inet6_rtm_getroute() local
6029 rtm = nlmsg_data(nlh); in inet6_rtm_getroute()
6030 fl6.flowlabel = ip6_make_flowinfo(rtm->rtm_tos, 0); in inet6_rtm_getroute()
6031 fibmatch = !!(rtm->rtm_flags & RTM_F_FIB_MATCH); in inet6_rtm_getroute()