netlabel: Always remove the correct address selector
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 <068c5733422cc06c659cc90b456ecba7d5bc7e86@numericable.fr>
Signed-off-by: Paul Moore <0fd1bf839ec6540c47f8fc82b7605eea08b33a06@hp.com>
Acked-by: James Morris <10d11de3abc355eabe955bb734f0f8e71da56e16@namei.org>
Tested-by: Etienne Basset <068c5733422cc06c659cc90b456ecba7d5bc7e86@numericable.fr>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs