summaryrefslogtreecommitdiff
path: root/include/net/cipso_ipv4.h
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2013-12-11 00:00:50 +0400
committerDavid S. Miller <davem@davemloft.net>2013-12-11 02:56:54 +0400
commit10ae76faa97cb3e1020dcf2cdae6b1ea8359abab (patch)
tree91eac61198da226f84d78195f71cf21c49ec458e /include/net/cipso_ipv4.h
parent971a351ccbbd2b6eef136a2221da0b80aca50906 (diff)
downloadlinux-10ae76faa97cb3e1020dcf2cdae6b1ea8359abab.tar.xz
cipso: cleanup cipso_v4_translate() when !CONFIG_NETLABEL
Don't needlessly recompute 'opt[opt_iter + 1]' as we already have it stored in 'tag_len'. Signed-off-by: Paul Moore <pmoore@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/cipso_ipv4.h')
-rw-r--r--include/net/cipso_ipv4.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h
index 2179d071f68f..a6fd939f202d 100644
--- a/include/net/cipso_ipv4.h
+++ b/include/net/cipso_ipv4.h
@@ -303,7 +303,7 @@ static inline int cipso_v4_validate(const struct sk_buff *skb,
for (opt_iter = 6; opt_iter < opt_len;) {
tag_len = opt[opt_iter + 1];
- if ((tag_len == 0) || (opt[opt_iter + 1] > (opt_len - opt_iter))) {
+ if ((tag_len == 0) || (tag_len > (opt_len - opt_iter))) {
err_offset = opt_iter + 1;
goto out;
}