Skip to contentSkip to conversation

neighbor: NTF_PROXY is a valid ndm_flag for a dump request

PATCH Applied David Ahern 2 participants 2 messages Dec 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 neighbor: NTF_PROXY is a valid ndm_flag for a dump request

From: David Ahern <[email protected]>

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")
---
 net/core/neighbour.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
net/core/neighbour.c +6 -1
index 41954e42a2de..5fa32c064baf 100644
@@ -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 {
Signature · 1 line
2.11.0
maintainer Applied
#1 lore raw

From: David Ahern <[email protected]>
Date: Wed, 19 Dec 2018 16:54:38 -0800

Quoted 8 lines

From: David Ahern <[email protected]>

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")

Applied.