]> git.baikalelectronics.ru Git - kernel.git/commit
netlabel: Always remove the correct address selector
authorPaul Moore <paul.moore@hp.com>
Tue, 21 Apr 2009 10:04:22 +0000 (10:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2009 07:46:09 +0000 (00:46 -0700)
commitddf2c3c326ec5d5e28156768d9b4db4324593059
tree8ee63f5f2e28a501d5a91ac13ffea112d2018afc
parent88ba191a3b1c9c2a0bc7ea3a3eccabf2807ac42f
netlabel: Always remove the correct address selector

The NetLabel address selector mechanism has a problem where it can get
mistakenly remove the wrong selector when similar addresses are used.  The
problem is caused when multiple addresses are configured that have different
netmasks but the same address, e.g. 127.0.0.0/8 and 127.0.0.0/24.  This patch
fixes the problem.

Reported-by: Etienne Basset <etienne.basset@numericable.fr>
Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: James Morris <jmorris@namei.org>
Tested-by: Etienne Basset <etienne.basset@numericable.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlabel/netlabel_addrlist.c