summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-07-29 04:21:16 +0300
committerJakub Kicinski <kuba@kernel.org>2022-07-29 04:21:16 +0300
commit272ac32f566e3f925b20c231a2b30f6893aa258a (patch)
treec7c04a13d89349f0d007914904347df79438f3fa /net/bridge
parent623cd87006983935de6c2ad8e2d50e68f1b7d6e7 (diff)
parent33ea1340bafe1f394e5bf96fceef73e9771d066b (diff)
downloadlinux-272ac32f566e3f925b20c231a2b30f6893aa258a.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netlink.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 1ef14a099c6b..5aeb3646e74c 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -589,9 +589,13 @@ static int br_fill_ifinfo(struct sk_buff *skb,
}
done:
+ if (af) {
+ if (nlmsg_get_pos(skb) - (void *)af > nla_attr_size(0))
+ nla_nest_end(skb, af);
+ else
+ nla_nest_cancel(skb, af);
+ }
- if (af)
- nla_nest_end(skb, af);
nlmsg_end(skb, nlh);
return 0;