]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virnetlink: Split virNetlinkBridgeVlanFilterSet()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 12 May 2025 13:00:04 +0000 (15:00 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 14 May 2025 10:32:11 +0000 (12:32 +0200)
commit6c4260b5017832c1a1b3a1cc9397d9c778702d0a
treeb8e83d183f3730a7d08f1c39ceee64c9a2738ee4
parent6a23a61496769613fa765a579eb3f9da558f0a8b
virnetlink: Split virNetlinkBridgeVlanFilterSet()

Currently, virNetlinkBridgeVlanFilterSet() takes @cmd as the
second argument where either RTM_SETLINK or RTM_DELLINK is
expected. Both of these constants come from linux/rtnetlink.h and
thus are undefined when building without netlink. This design
also clashes with the whole point of virnetlink: to offload
netlink dependency onto a single file.

Therefore, drop the argument, turn
virNetlinkBridgeVlanFilterSet() into just setter, effectively,
and introduce virNetlinkBridgeVlanFilterDel() for the case when
RTM_DELLINK would be passed as @cmd.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/770
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/util/virnetdevbridge.c
src/util/virnetlink.c
src/util/virnetlink.h