]> git.baikalelectronics.ru Git - kernel.git/commit
NetLabel: return the correct error for translated CIPSOv4 tags
authorPaul Moore <paul.moore@hp.com>
Fri, 17 Nov 2006 22:38:50 +0000 (17:38 -0500)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:24:11 +0000 (21:24 -0800)
commit0c86ef9ab9bf9835bb5978a9d866d1b0377be9e2
tree29aa9d8d4b658dd160bc35af3678b4d1113e1577
parentca18a397c69eb87b04057125d7998733f56de5ec
NetLabel: return the correct error for translated CIPSOv4 tags

The CIPSOv4 translated tag #1 mapping does not always return the correct error
code if the desired mapping does not exist; instead of returning -EPERM it
returns -ENOSPC indicating that the buffer is not large enough to hold the
translated value.  This was caused by failing to check a specific error
condition.  This patch fixes this so that unknown mappings return
-EPERM which is consistent with the rest of the related CIPSOv4 code.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
net/ipv4/cipso_ipv4.c