neighbor: Use nda_policy for validating attributes in adds and dump requests
authorDavid Ahern <dsahern@gmail.com>
Thu, 20 Dec 2018 04:02:36 +0000 (20:02 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Dec 2018 07:55:36 +0000 (23:55 -0800)
commita9cd3439e3c6d777a05c63b4d06c3500d1d4074e
treef95e57c8f82293db88ecb3cbad3e2b7e0fee9f7c
parentd129a45b5c9d9ad814adb795413d76be6b28a47e
neighbor: Use nda_policy for validating attributes in adds and dump requests

Add NDA_PROTOCOL to nda_policy and use the policy for attribute parsing and
validation for adding neighbors and in dump requests. Remove the now duplicate
checks on nla_len.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/neighbour.c