Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41752
b: refs/heads/master
c: 6ce61a7
h: refs/heads/master
v: v3
  • Loading branch information
Paul Moore authored and David S. Miller committed Dec 3, 2006
1 parent 9f0bcbe commit 2cec5b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05e00cbf5036929355020dab4837b637203a0742
refs/heads/master: 6ce61a7c2678800cfe59a5f4a41ce8f785b9d355
14 changes: 14 additions & 0 deletions trunk/net/ipv4/cipso_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,22 @@ static struct cipso_v4_doi *cipso_v4_doi_search(u32 doi)
*/
int cipso_v4_doi_add(struct cipso_v4_doi *doi_def)
{
u32 iter;

if (doi_def == NULL || doi_def->doi == CIPSO_V4_DOI_UNKNOWN)
return -EINVAL;
for (iter = 0; iter < CIPSO_V4_TAG_MAXCNT; iter++) {
switch (doi_def->tags[iter]) {
case CIPSO_V4_TAG_RBITMAP:
break;
case CIPSO_V4_TAG_INVALID:
if (iter == 0)
return -EINVAL;
break;
default:
return -EINVAL;
}
}

doi_def->valid = 1;
INIT_RCU_HEAD(&doi_def->rcu);
Expand Down

0 comments on commit 2cec5b8

Please sign in to comment.