Lines Matching refs:nla

676 static int fib_gw_from_attr(__be32 *gw, struct nlattr *nla,  in fib_gw_from_attr()  argument
679 if (nla_len(nla) < sizeof(*gw)) { in fib_gw_from_attr()
684 *gw = nla_get_in_addr(nla); in fib_gw_from_attr()
721 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_get_nhs() local
723 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_get_nhs()
725 if (nla && nlav) { in fib_get_nhs()
730 if (nla) { in fib_get_nhs()
731 ret = fib_gw_from_attr(&fib_cfg.fc_gw4, nla, in fib_get_nhs()
744 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_get_nhs()
745 if (nla) { in fib_get_nhs()
746 if (nla_len(nla) < sizeof(u32)) { in fib_get_nhs()
750 fib_cfg.fc_flow = nla_get_u32(nla); in fib_get_nhs()
757 nla = nla_find(attrs, attrlen, RTA_ENCAP_TYPE); in fib_get_nhs()
758 if (nla) in fib_get_nhs()
759 fib_cfg.fc_encap_type = nla_get_u16(nla); in fib_get_nhs()
947 struct nlattr *nla, *nlav, *attrs = rtnh_attrs(rtnh); in fib_nh_match() local
950 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_nh_match()
952 if (nla && nlav) { in fib_nh_match()
958 if (nla) { in fib_nh_match()
961 err = fib_gw_from_attr(&gw, nla, extack); in fib_nh_match()
991 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_nh_match()
992 if (nla) { in fib_nh_match()
993 if (nla_len(nla) < sizeof(u32)) { in fib_nh_match()
997 if (nla_get_u32(nla) != nh->nh_tclassid) in fib_nh_match()
1011 struct nlattr *nla; in fib_metrics_match() local
1017 nla_for_each_attr(nla, cfg->fc_mx, cfg->fc_mx_len, remaining) { in fib_metrics_match()
1018 int type = nla_type(nla); in fib_metrics_match()
1031 nla_strscpy(tmp, nla, sizeof(tmp)); in fib_metrics_match()
1034 if (nla_len(nla) != sizeof(u32)) in fib_metrics_match()
1036 val = nla_get_u32(nla); in fib_metrics_match()
1668 struct nlattr *nla; in fib_nexthop_info() local
1671 nla = nla_reserve(skb, RTA_VIA, alen + 2); in fib_nexthop_info()
1672 if (!nla) in fib_nexthop_info()
1675 via = nla_data(nla); in fib_nexthop_info()