[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181230141758.GA4376@splinter.mtl.com>
Date: Sun, 30 Dec 2018 16:17:58 +0200
From: Ido Schimmel <idosch@...sch.org>
To: David Ahern <dsahern@...nel.org>
Cc: netdev@...r.kernel.org, stephen@...workplumber.org,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH iproute2-next 00/12] Updates for strict checking and
kernel side filtering
On Wed, Dec 19, 2018 at 07:54:15PM -0800, David Ahern wrote:
> From: David Ahern <dsahern@...il.com>
>
> Refactorings and updates to use the new strict checking in the kernel
> along with the new kernel side filtering.
David,
Since this was applied to iproute2-next I get:
bash-4.4# bridge/bridge fdb show
[ 5365.137224] netlink: 4 bytes leftover after parsing attributes in process `bridge'.
Error: bytes leftover after parsing attributes.
Dump terminated
And a lot of tests are failing. Given you enabled strict checking, I
assume we should be using 'struct ndmsg' in FDB dump? Following patch
fixes it for me. I can submit formally if you don't already have a
patch.
diff --git a/bridge/fdb.c b/bridge/fdb.c
index a5abc1b6c78d..a7a0d8052307 100644
--- a/bridge/fdb.c
+++ b/bridge/fdb.c
@@ -260,16 +260,16 @@ static int fdb_show(int argc, char **argv)
{
struct {
struct nlmsghdr n;
- struct ifinfomsg ifm;
+ struct ndmsg ndm;
char buf[256];
} req = {
- .n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
- .ifm.ifi_family = PF_BRIDGE,
+ .n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)),
+ .ndm.ndm_family = PF_BRIDGE,
};
char *filter_dev = NULL;
char *br = NULL;
- int msg_size = sizeof(struct ifinfomsg);
+ int msg_size = sizeof(struct ndmsg);
while (argc > 0) {
if ((strcmp(*argv, "brport") == 0) || strcmp(*argv, "dev") == 0) {
@@ -313,10 +313,10 @@ static int fdb_show(int argc, char **argv)
filter_index = ll_name_to_index(filter_dev);
if (!filter_index)
return nodev(filter_dev);
- req.ifm.ifi_index = filter_index;
+ req.ndm.ndm_ifindex = filter_index;
}
- if (rtnl_dump_request(&rth, RTM_GETNEIGH, &req.ifm, msg_size) < 0) {
+ if (rtnl_dump_request(&rth, RTM_GETNEIGH, &req.ndm, msg_size) < 0) {
perror("Cannot send dump request");
exit(1);
}
Powered by blists - more mailing lists