diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-07 23:27:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-07 23:27:38 +0100 |
commit | 4c8237cd76a0510677dc2e3dd0f8866ec8e0b1e5 (patch) | |
tree | 09f2b802b5f493bfd5345ec808f3b58300cab168 /net/ipv4/fib_lookup.h | |
parent | netdevice: Convert printk to pr_info in netif_tx_stop_queue (diff) | |
download | linux-4c8237cd76a0510677dc2e3dd0f8866ec8e0b1e5.tar.xz linux-4c8237cd76a0510677dc2e3dd0f8866ec8e0b1e5.zip |
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>
Diffstat (limited to 'net/ipv4/fib_lookup.h')
0 files changed, 0 insertions, 0 deletions