Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10ae76fa authored by Paul Moore's avatar Paul Moore Committed by David S. Miller
Browse files

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: default avatarPaul Moore <pmoore@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 971a351c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -303,7 +303,7 @@ static inline int cipso_v4_validate(const struct sk_buff *skb,


	for (opt_iter = 6; opt_iter < opt_len;) {
	for (opt_iter = 6; opt_iter < opt_len;) {
		tag_len = opt[opt_iter + 1];
		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;
			err_offset = opt_iter + 1;
			goto out;
			goto out;
		}
		}