]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ovpn: add missing rtnl_link_ops->get_size callback
authorRalf Lici <ralf@mandelbit.com>
Wed, 29 Jul 2026 13:41:30 +0000 (15:41 +0200)
committerAntonio Quartulli <antonio@openvpn.net>
Wed, 29 Jul 2026 14:09:32 +0000 (16:09 +0200)
commit6e9f539e4f01153651dd77609b5ccadd44b74df8
treecfd8a9d151b8d0bc7f52110bd902e2bbda600a6b
parent51b093a7ba27476e1f639455f005e8d2e75390e4
ovpn: add missing rtnl_link_ops->get_size callback

ovpn_fill_info emits IFLA_OVPN_MODE inside IFLA_INFO_DATA, but
ovpn_link_ops does not provide a get_size callback. Consequently,
rtnetlink's size estimate for ovpn link messages does not include the
nested mode attribute.

Available skb tailroom may hide this mismatch. When the remaining space
is insufficient, however, ovpn_fill_info returns -EMSGSIZE and message
construction fails.

Add the callback and account for IFLA_OVPN_MODE.

Fixes: c2d950c4672a ("ovpn: add basic interface creation/destruction/management routines")
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
drivers/net/ovpn/main.c