Lines Matching refs:nla

665 static int fib_gw_from_attr(__be32 *gw, struct nlattr *nla,  in fib_gw_from_attr()  argument
668 if (nla_len(nla) < sizeof(*gw)) { in fib_gw_from_attr()
673 *gw = nla_get_in_addr(nla); in fib_gw_from_attr()
710 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_get_nhs() local
712 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_get_nhs()
714 if (nla && nlav) { in fib_get_nhs()
719 if (nla) { in fib_get_nhs()
720 ret = fib_gw_from_attr(&fib_cfg.fc_gw4, nla, in fib_get_nhs()
733 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_get_nhs()
734 if (nla) { in fib_get_nhs()
735 if (nla_len(nla) < sizeof(u32)) { in fib_get_nhs()
739 fib_cfg.fc_flow = nla_get_u32(nla); in fib_get_nhs()
746 nla = nla_find(attrs, attrlen, RTA_ENCAP_TYPE); in fib_get_nhs()
747 if (nla) in fib_get_nhs()
748 fib_cfg.fc_encap_type = nla_get_u16(nla); in fib_get_nhs()
929 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_nh_match() local
932 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_nh_match()
934 if (nla && nlav) { in fib_nh_match()
940 if (nla) { in fib_nh_match()
943 err = fib_gw_from_attr(&gw, nla, extack); in fib_nh_match()
973 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_nh_match()
974 if (nla) { in fib_nh_match()
975 if (nla_len(nla) < sizeof(u32)) { in fib_nh_match()
979 if (nla_get_u32(nla) != nh->nh_tclassid) in fib_nh_match()
993 struct nlattr *nla; in fib_metrics_match() local
999 nla_for_each_attr(nla, cfg->fc_mx, cfg->fc_mx_len, remaining) { in fib_metrics_match()
1000 int type = nla_type(nla); in fib_metrics_match()
1012 nla_strscpy(tmp, nla, sizeof(tmp)); in fib_metrics_match()
1015 if (nla_len(nla) != sizeof(u32)) in fib_metrics_match()
1017 val = nla_get_u32(nla); in fib_metrics_match()
1663 struct nlattr *nla; in fib_nexthop_info() local
1666 nla = nla_reserve(skb, RTA_VIA, alen + 2); in fib_nexthop_info()
1667 if (!nla) in fib_nexthop_info()
1670 via = nla_data(nla); in fib_nexthop_info()