Alexander Duyck 3c9e9f7320 fib_trie: Avoid NULL pointer if local table is not allocated
The function fib_unmerge assumed the local table had already been
allocated.  If that is not the case however when custom rules are applied
then this can result in a NULL pointer dereference.

In order to prevent this we must check the value of the local table pointer
and if it is NULL simply return 0 as there is no local table to separate
from the main.

Fixes: 0ddcf43d5 ("ipv4: FIB Local/MAIN table collapse")
Reported-by: Madhu Challa <challa@noironetworks.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-12 18:26:51 -04:00
..
2015-03-04 00:23:23 -05:00
2015-03-12 14:39:40 -04:00
2015-01-31 17:48:18 -08:00
2015-03-11 21:55:28 -04:00
2015-03-12 14:39:40 -04:00
2015-01-28 22:18:37 -08:00
2015-02-20 15:04:03 -05:00
2015-02-28 16:56:51 -05:00
2015-02-28 16:56:51 -05:00
2015-01-28 22:18:37 -08:00
2015-01-28 22:18:37 -08:00
2015-01-28 22:18:37 -08:00