* [PATCH net] neighbor: NTF_PROXY is a valid ndm_flag for a dump request
@ 2018-12-20 0:54 David Ahern
2018-12-20 1:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2018-12-20 0:54 UTC (permalink / raw)
To: netdev; +Cc: davem, David Ahern
From: David Ahern <dsahern@gmail.com>
When dumping proxy entries the dump request has NTF_PROXY set in
ndm_flags. strict mode checking needs to be updated to allow this
flag.
Fixes: 51183d233b5a ("net/neighbor: Update neigh_dump_info for strict data checking")
Signed-off-by: David Ahern <dsahern@gmail.com>
---
net/core/neighbour.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 41954e42a2de..5fa32c064baf 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2494,11 +2494,16 @@ static int neigh_valid_dump_req(const struct nlmsghdr *nlh,
ndm = nlmsg_data(nlh);
if (ndm->ndm_pad1 || ndm->ndm_pad2 || ndm->ndm_ifindex ||
- ndm->ndm_state || ndm->ndm_flags || ndm->ndm_type) {
+ ndm->ndm_state || ndm->ndm_type) {
NL_SET_ERR_MSG(extack, "Invalid values in header for neighbor dump request");
return -EINVAL;
}
+ if (ndm->ndm_flags & ~NTF_PROXY) {
+ NL_SET_ERR_MSG(extack, "Invalid flags in header for neighbor dump request");
+ return -EINVAL;
+ }
+
err = nlmsg_parse_strict(nlh, sizeof(struct ndmsg), tb, NDA_MAX,
NULL, extack);
} else {
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] neighbor: NTF_PROXY is a valid ndm_flag for a dump request
2018-12-20 0:54 [PATCH net] neighbor: NTF_PROXY is a valid ndm_flag for a dump request David Ahern
@ 2018-12-20 1:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-20 1:31 UTC (permalink / raw)
To: dsahern; +Cc: netdev, dsahern
From: David Ahern <dsahern@kernel.org>
Date: Wed, 19 Dec 2018 16:54:38 -0800
> From: David Ahern <dsahern@gmail.com>
>
> When dumping proxy entries the dump request has NTF_PROXY set in
> ndm_flags. strict mode checking needs to be updated to allow this
> flag.
>
> Fixes: 51183d233b5a ("net/neighbor: Update neigh_dump_info for strict data checking")
> Signed-off-by: David Ahern <dsahern@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-20 1:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20 0:54 [PATCH net] neighbor: NTF_PROXY is a valid ndm_flag for a dump request David Ahern
2018-12-20 1:31 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).