David S. Miller 4c8237cd76 ipv4: Validate route entry type at insert instead of every lookup.
fib_semantic_match() requires that if the type doesn't signal an
automatic error, it must be of type RTN_UNICAST, RTN_LOCAL,
RTN_BROADCAST, RTN_ANYCAST, or RTN_MULTICAST.

Checking this every route lookup is pointless work.

Instead validate it during route insertion, via fib_create_info().

Also, there was nothing making sure the type value was less than
RTN_MAX, so add that missing check while we're here.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-07 14:27:38 -08:00
..
2011-02-08 14:00:40 -08:00
2010-10-25 13:09:45 -07:00
2011-03-04 21:55:31 -08:00
2011-03-04 14:33:59 -08:00
2011-01-14 13:36:42 +01:00
2010-02-22 16:20:22 -08:00
2011-03-04 21:55:31 -08:00
2011-02-01 15:35:25 -08:00
2011-02-01 15:35:25 -08:00
2011-03-04 21:55:31 -08:00
2009-03-02 03:00:15 -08:00
2009-03-02 03:00:15 -08:00
2011-02-21 11:31:18 -08:00
2009-05-25 22:44:59 -07:00
2010-09-23 14:33:39 -07:00
2010-10-27 11:37:32 -07:00
2010-07-12 12:57:54 -07:00