Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fceb6435 authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller
Browse files

netlink: pass extended ACK struct to parsing functions



Pass the new extended ACK reporting struct to all of the generic
netlink parsing functions. For now, pass NULL in almost all callers
(except for some in the core.)

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ba0dc5f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -523,7 +523,7 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
	}

	err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, CRYPTOCFGA_MAX,
			  crypto_policy);
			  crypto_policy, NULL);
	if (err < 0)
		return err;

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ int drbd_nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla,

	err = drbd_nla_check_mandatory(maxtype, nla);
	if (!err)
		err = nla_parse_nested(tb, maxtype, nla, policy);
		err = nla_parse_nested(tb, maxtype, nla, policy, NULL);

	return err;
}
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ static inline bool ib_nl_is_good_ip_resp(const struct nlmsghdr *nlh)
		return false;

	ret = nla_parse(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh),
			nlmsg_len(nlh), ib_nl_addr_policy);
			nlmsg_len(nlh), ib_nl_addr_policy, NULL);
	if (ret)
		return false;

+4 −2
Original line number Diff line number Diff line
@@ -472,12 +472,14 @@ int iwpm_parse_nlmsg(struct netlink_callback *cb, int policy_max,
	int ret;
	const char *err_str = "";

	ret = nlmsg_validate(cb->nlh, nlh_len, policy_max-1, nlmsg_policy);
	ret = nlmsg_validate(cb->nlh, nlh_len, policy_max - 1, nlmsg_policy,
			     NULL);
	if (ret) {
		err_str = "Invalid attribute";
		goto parse_nlmsg_error;
	}
	ret = nlmsg_parse(cb->nlh, nlh_len, nltb, policy_max-1, nlmsg_policy);
	ret = nlmsg_parse(cb->nlh, nlh_len, nltb, policy_max - 1,
			  nlmsg_policy, NULL);
	if (ret) {
		err_str = "Unable to parse the nlmsg";
		goto parse_nlmsg_error;
+2 −2
Original line number Diff line number Diff line
@@ -808,7 +808,7 @@ int ib_nl_handle_set_timeout(struct sk_buff *skb,
		return -EPERM;

	ret = nla_parse(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh),
			nlmsg_len(nlh), ib_nl_policy);
			nlmsg_len(nlh), ib_nl_policy, NULL);
	attr = (const struct nlattr *)tb[LS_NLA_TYPE_TIMEOUT];
	if (ret || !attr)
		goto settimeout_out;
@@ -860,7 +860,7 @@ static inline int ib_nl_is_good_resolve_resp(const struct nlmsghdr *nlh)
		return 0;

	ret = nla_parse(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh),
			nlmsg_len(nlh), ib_nl_policy);
			nlmsg_len(nlh), ib_nl_policy, NULL);
	if (ret)
		return 0;

Loading