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: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -101,7 +101,7 @@ static int netlbl_cipsov4_add_common(struct genl_info *info,
|
||||
|
||||
if (nla_validate_nested(info->attrs[NLBL_CIPSOV4_A_TAGLST],
|
||||
NLBL_CIPSOV4_A_MAX,
|
||||
netlbl_cipsov4_genl_policy) != 0)
|
||||
netlbl_cipsov4_genl_policy, NULL) != 0)
|
||||
return -EINVAL;
|
||||
|
||||
nla_for_each_nested(nla, info->attrs[NLBL_CIPSOV4_A_TAGLST], nla_rem)
|
||||
@@ -148,7 +148,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info,
|
||||
|
||||
if (nla_validate_nested(info->attrs[NLBL_CIPSOV4_A_MLSLVLLST],
|
||||
NLBL_CIPSOV4_A_MAX,
|
||||
netlbl_cipsov4_genl_policy) != 0)
|
||||
netlbl_cipsov4_genl_policy, NULL) != 0)
|
||||
return -EINVAL;
|
||||
|
||||
doi_def = kmalloc(sizeof(*doi_def), GFP_KERNEL);
|
||||
@@ -170,10 +170,10 @@ static int netlbl_cipsov4_add_std(struct genl_info *info,
|
||||
info->attrs[NLBL_CIPSOV4_A_MLSLVLLST],
|
||||
nla_a_rem)
|
||||
if (nla_type(nla_a) == NLBL_CIPSOV4_A_MLSLVL) {
|
||||
if (nla_validate_nested(nla_a,
|
||||
NLBL_CIPSOV4_A_MAX,
|
||||
netlbl_cipsov4_genl_policy) != 0)
|
||||
goto add_std_failure;
|
||||
if (nla_validate_nested(nla_a, NLBL_CIPSOV4_A_MAX,
|
||||
netlbl_cipsov4_genl_policy,
|
||||
NULL) != 0)
|
||||
goto add_std_failure;
|
||||
nla_for_each_nested(nla_b, nla_a, nla_b_rem)
|
||||
switch (nla_type(nla_b)) {
|
||||
case NLBL_CIPSOV4_A_MLSLVLLOC:
|
||||
@@ -236,7 +236,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info,
|
||||
if (info->attrs[NLBL_CIPSOV4_A_MLSCATLST]) {
|
||||
if (nla_validate_nested(info->attrs[NLBL_CIPSOV4_A_MLSCATLST],
|
||||
NLBL_CIPSOV4_A_MAX,
|
||||
netlbl_cipsov4_genl_policy) != 0)
|
||||
netlbl_cipsov4_genl_policy, NULL) != 0)
|
||||
goto add_std_failure;
|
||||
|
||||
nla_for_each_nested(nla_a,
|
||||
@@ -244,8 +244,9 @@ static int netlbl_cipsov4_add_std(struct genl_info *info,
|
||||
nla_a_rem)
|
||||
if (nla_type(nla_a) == NLBL_CIPSOV4_A_MLSCAT) {
|
||||
if (nla_validate_nested(nla_a,
|
||||
NLBL_CIPSOV4_A_MAX,
|
||||
netlbl_cipsov4_genl_policy) != 0)
|
||||
NLBL_CIPSOV4_A_MAX,
|
||||
netlbl_cipsov4_genl_policy,
|
||||
NULL) != 0)
|
||||
goto add_std_failure;
|
||||
nla_for_each_nested(nla_b, nla_a, nla_b_rem)
|
||||
switch (nla_type(nla_b)) {
|
||||
|
新增問題並參考
封鎖使用者