From: Ido Schimmel <idosch@idosch.org>
To: David Ahern <dsahern@kernel.org>
Cc: netdev@vger.kernel.org, stephen@networkplumber.org,
David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH iproute2-next 00/12] Updates for strict checking and kernel side filtering
Date: Sun, 30 Dec 2018 16:17:58 +0200 [thread overview]
Message-ID: <20181230141758.GA4376@splinter.mtl.com> (raw)
In-Reply-To: <20181220035427.14453-1-dsahern@kernel.org>
On Wed, Dec 19, 2018 at 07:54:15PM -0800, David Ahern wrote:
> From: David Ahern <dsahern@gmail.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);
}
next prev parent reply other threads:[~2018-12-30 14:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 3:54 [PATCH iproute2-next 00/12] Updates for strict checking and kernel side filtering David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 01/12] libnetlink: dump extack string in done message David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 02/12] libnetlink: Use NLMSG_LENGTH to set nlmsg_len David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 03/12] libnetlink: linkdump_req: Only AF_UNSPEC family expects an ext_filter_mask David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 04/12] ip route: Remove rtnl_rtcache_request David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 05/12] ip route: Add protocol, table id and device to dump request David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 06/12] mroute: fix up family handling David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 07/12] mroute: Add table id attribute for kernel side filtering David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 08/12] ip address: Split ip_linkaddr_list into link and addr functions David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 09/12] ip address: Set device index in dump request David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 10/12] ip bridge: Set NETLINK_DUMP_STRICT_CHK on socket David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 11/12] ip route: Rename do_ipv6 to dump_family David Ahern
2018-12-20 3:54 ` [PATCH iproute2-next 12/12] neighbor: Add support for protocol attribute David Ahern
2018-12-30 14:17 ` Ido Schimmel [this message]
2018-12-30 15:10 ` [PATCH iproute2-next 00/12] Updates for strict checking and kernel side filtering David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181230141758.GA4376@splinter.mtl.com \
--to=idosch@idosch.org \
--cc=dsahern@gmail.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).