aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlabel/netlabel_cipso_v4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlabel/netlabel_cipso_v4.c')
-rw-r--r--net/netlabel/netlabel_cipso_v4.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/netlabel/netlabel_cipso_v4.c b/net/netlabel/netlabel_cipso_v4.c
index 1fbc906a9737..4afc75f9e377 100644
--- a/net/netlabel/netlabel_cipso_v4.c
+++ b/net/netlabel/netlabel_cipso_v4.c
@@ -162,6 +162,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
162 struct nlattr *nla_b; 162 struct nlattr *nla_b;
163 int nla_a_rem; 163 int nla_a_rem;
164 int nla_b_rem; 164 int nla_b_rem;
165 u32 iter;
165 166
166 if (!info->attrs[NLBL_CIPSOV4_A_TAGLST] || 167 if (!info->attrs[NLBL_CIPSOV4_A_TAGLST] ||
167 !info->attrs[NLBL_CIPSOV4_A_MLSLVLLST]) 168 !info->attrs[NLBL_CIPSOV4_A_MLSLVLLST])
@@ -231,6 +232,10 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
231 ret_val = -ENOMEM; 232 ret_val = -ENOMEM;
232 goto add_std_failure; 233 goto add_std_failure;
233 } 234 }
235 for (iter = 0; iter < doi_def->map.std->lvl.local_size; iter++)
236 doi_def->map.std->lvl.local[iter] = CIPSO_V4_INV_LVL;
237 for (iter = 0; iter < doi_def->map.std->lvl.cipso_size; iter++)
238 doi_def->map.std->lvl.cipso[iter] = CIPSO_V4_INV_LVL;
234 nla_for_each_nested(nla_a, 239 nla_for_each_nested(nla_a,
235 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST], 240 info->attrs[NLBL_CIPSOV4_A_MLSLVLLST],
236 nla_a_rem) 241 nla_a_rem)
@@ -302,6 +307,10 @@ static int netlbl_cipsov4_add_std(struct genl_info *info)
302 ret_val = -ENOMEM; 307 ret_val = -ENOMEM;
303 goto add_std_failure; 308 goto add_std_failure;
304 } 309 }
310 for (iter = 0; iter < doi_def->map.std->cat.local_size; iter++)
311 doi_def->map.std->cat.local[iter] = CIPSO_V4_INV_CAT;
312 for (iter = 0; iter < doi_def->map.std->cat.cipso_size; iter++)
313 doi_def->map.std->cat.cipso[iter] = CIPSO_V4_INV_CAT;
305 nla_for_each_nested(nla_a, 314 nla_for_each_nested(nla_a,
306 info->attrs[NLBL_CIPSOV4_A_MLSCATLST], 315 info->attrs[NLBL_CIPSOV4_A_MLSCATLST],
307 nla_a_rem) 316 nla_a_rem)