Commit af52020f authored by Antonio Quartulli's avatar Antonio Quartulli
Browse files

ovpn: reject unexpected netlink attributes



Netlink ops do not expect all attributes to be always set, however
this condition is not explicitly coded any where, leading the user
to believe that all sent attributes are somewhat processed.

Fix this behaviour by introducing explicit checks.

For CMD_OVPN_PEER_GET and CMD_OVPN_KEY_GET directly open-code the
needed condition in the related ops handlers.
While for all other ops use attribute subsets in the ovpn.yaml spec file.

Fixes: b7a63391 ("ovpn: add basic netlink support")
Reported-by: default avatarRalf Lici <ralf@mandelbit.com>
Closes: https://github.com/OpenVPN/ovpn-net-next/issues/19


Signed-off-by: default avatarAntonio Quartulli <antonio@openvpn.net>
parent 4c88cfcc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment