[IPv4]: Convert route get to new netlink api

Fixes various unvalidated netlink attributes causing memory
corruptions when left empty by userspace applications.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Thomas Graf
2006-08-17 18:15:44 -07:00
committed by David S. Miller
parent be403ea185
commit d889ce3b29
3 changed files with 47 additions and 40 deletions

View File

@@ -453,7 +453,7 @@ int ip_rt_ioctl(unsigned int cmd, void *arg)
#endif
static struct nla_policy rtm_ipv4_policy[RTA_MAX+1] __read_mostly = {
struct nla_policy rtm_ipv4_policy[RTA_MAX+1] __read_mostly = {
[RTA_DST] = { .type = NLA_U32 },
[RTA_SRC] = { .type = NLA_U32 },
[RTA_IIF] = { .type = NLA_U32 },