aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/cipso_ipv4.c
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2006-11-17 17:38:52 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:24:12 -0500
commit9bb5fd2b05cb4dba229e225536faa59eaadd837d (patch)
tree1a855c90999b1d7ec64b6e79fd27dbc1287f5a32 /net/ipv4/cipso_ipv4.c
parentc6b1677a54330b72d961270c9a66bb99c62c4a8e (diff)
NetLabel: use cipso_v4_doi_search() for local CIPSOv4 functions
The cipso_v4_doi_search() function behaves the same as cipso_v4_doi_getdef() but is a local, static function so use it whenever possibile in the CIPSOv4 code base. Signed-of-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'net/ipv4/cipso_ipv4.c')
-rw-r--r--net/ipv4/cipso_ipv4.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index c305de6fa206..a60af8304073 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -1135,7 +1135,7 @@ int cipso_v4_validate(unsigned char **option)
1135 } 1135 }
1136 1136
1137 rcu_read_lock(); 1137 rcu_read_lock();
1138 doi_def = cipso_v4_doi_getdef(ntohl(*((__be32 *)&opt[2]))); 1138 doi_def = cipso_v4_doi_search(ntohl(*((u32 *)&opt[2])));
1139 if (doi_def == NULL) { 1139 if (doi_def == NULL) {
1140 err_offset = 2; 1140 err_offset = 2;
1141 goto validate_return_locked; 1141 goto validate_return_locked;
@@ -1380,7 +1380,7 @@ int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr)
1380 1380
1381 doi = ntohl(*(__be32 *)&cipso_ptr[2]); 1381 doi = ntohl(*(__be32 *)&cipso_ptr[2]);
1382 rcu_read_lock(); 1382 rcu_read_lock();
1383 doi_def = cipso_v4_doi_getdef(doi); 1383 doi_def = cipso_v4_doi_search(doi);
1384 if (doi_def == NULL) { 1384 if (doi_def == NULL) {
1385 rcu_read_unlock(); 1385 rcu_read_unlock();
1386 return -ENOMSG; 1386 return -ENOMSG;
@@ -1448,7 +1448,7 @@ int cipso_v4_skbuff_getattr(const struct sk_buff *skb,
1448 1448
1449 doi = ntohl(*(__be32 *)&cipso_ptr[2]); 1449 doi = ntohl(*(__be32 *)&cipso_ptr[2]);
1450 rcu_read_lock(); 1450 rcu_read_lock();
1451 doi_def = cipso_v4_doi_getdef(doi); 1451 doi_def = cipso_v4_doi_search(doi);
1452 if (doi_def == NULL) 1452 if (doi_def == NULL)
1453 goto skbuff_getattr_return; 1453 goto skbuff_getattr_return;
1454 1454