aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlabel
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlabel')
-rw-r--r--net/netlabel/netlabel_cipso_v4.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c
index c060e3f991f..ba0ca8d3f77 100644
--- a/net/netlabel/netlabel_cipso_v4.c
+++ b/net/netlabel/netlabel_cipso_v4.c
@@ -130,7 +130,7 @@ static int netlbl_cipsov4_add_common(struct genl_info *info,
130 return -EINVAL; 130 return -EINVAL;
131 131
132 nla_for_each_nested(nla, info->attrs[NLBL_CIPSOV4_A_TAGLST], nla_rem) 132 nla_for_each_nested(nla, info->attrs[NLBL_CIPSOV4_A_TAGLST], nla_rem)
133 if (nla->nla_type == NLBL_CIPSOV4_A_TAG) { 133 if (nla_type(nla) == NLBL_CIPSOV4_A_TAG) {
134 if (iter >= CIPSO_V4_TAG_MAXCNT) 134 if (iter >= CIPSO_V4_TAG_MAXCNT)
135 return -EINVAL; 135 return -EINVAL;
136 doi_def->tags[iter++] = nla_get_u8(nla); 136 doi_def->tags[iter++] = nla_get_u8(nla);
@@ -192,13 +192,13 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
192 nla_for_each_nested(nla_a, 192 nla_for_each_nested(nla_a,
193 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], 193 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST],
194 nla_a_rem) 194 nla_a_rem)
195 if (nla_a->nla_type == NLBL_CIPSOV4_A_MLSLVL) { 195 if (nla_type(nla_a) == NLBL_CIPSOV4_A_MLSLVL) {
196 if (nla_validate_nested(nla_a, 196 if (nla_validate_nested(nla_a,
197 NLBL_CIPSOV4_A_MAX, 197 NLBL_CIPSOV4_A_MAX,
198 netlbl_cipsov4_genl_policy) != 0) 198 netlbl_cipsov4_genl_policy) != 0)
199 goto add_std_failure; 199 goto add_std_failure;
200 nla_for_each_nested(nla_b, nla_a, nla_b_rem) 200 nla_for_each_nested(nla_b, nla_a, nla_b_rem)
201 switch (nla_b->nla_type) { 201 switch (nla_type(nla_b)) {
202 case NLBL_CIPSOV4_A_MLSLVLLOC: 202 case NLBL_CIPSOV4_A_MLSLVLLOC:
203 if (nla_get_u32(nla_b) > 203 if (nla_get_u32(nla_b) >
204 CIPSO_V4_MAX_LOC_LVLS) 204 CIPSO_V4_MAX_LOC_LVLS)
@@ -240,7 +240,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
240 nla_for_each_nested(nla_a, 240 nla_for_each_nested(nla_a,
241 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], 241 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST],
242 nla_a_rem) 242 nla_a_rem)
243 if (nla_a->nla_type == NLBL_CIPSOV4_A_MLSLVL) { 243 if (nla_type(nla_a) == NLBL_CIPSOV4_A_MLSLVL) {
244 struct nlattr *lvl_loc; 244 struct nlattr *lvl_loc;
245 struct nlattr *lvl_rem; 245 struct nlattr *lvl_rem;
246 246
@@ -265,13 +265,13 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
265 nla_for_each_nested(nla_a, 265 nla_for_each_nested(nla_a,
266 info->attrs[NLBL_CIPSOV4_A_MLSCATLST], 266 info->attrs[NLBL_CIPSOV4_A_MLSCATLST],
267 nla_a_rem) 267 nla_a_rem)
268 if (nla_a->nla_type == NLBL_CIPSOV4_A_MLSCAT) { 268 if (nla_type(nla_a) == NLBL_CIPSOV4_A_MLSCAT) {
269 if (nla_validate_nested(nla_a, 269 if (nla_validate_nested(nla_a,
270 NLBL_CIPSOV4_A_MAX, 270 NLBL_CIPSOV4_A_MAX,
271 netlbl_cipsov4_genl_policy) != 0) 271 netlbl_cipsov4_genl_policy) != 0)
272 goto add_std_failure; 272 goto add_std_failure;
273 nla_for_each_nested(nla_b, nla_a, nla_b_rem) 273 nla_for_each_nested(nla_b, nla_a, nla_b_rem)
274 switch (nla_b->nla_type) { 274 switch (nla_type(nla_b)) {
275 case NLBL_CIPSOV4_A_MLSCATLOC: 275 case NLBL_CIPSOV4_A_MLSCATLOC:
276 if (nla_get_u32(nla_b) > 276 if (nla_get_u32(nla_b) >
277 CIPSO_V4_MAX_LOC_CATS) 277 CIPSO_V4_MAX_LOC_CATS)
@@ -315,7 +315,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
315 nla_for_each_nested(nla_a, 315 nla_for_each_nested(nla_a,
316 info->attrs[NLBL_CIPSOV4_A_MLSCATLST], 316 info->attrs[NLBL_CIPSOV4_A_MLSCATLST],
317 nla_a_rem) 317 nla_a_rem)
318 if (nla_a->nla_type == NLBL_CIPSOV4_A_MLSCAT) { 318 if (nla_type(nla_a) == NLBL_CIPSOV4_A_MLSCAT) {
319 struct nlattr *cat_loc; 319 struct nlattr *cat_loc;
320 struct nlattr *cat_rem; 320 struct nlattr *cat_rem;
321 321