]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: allow sending mac addr to virNetNewLink without ifindex
authorLaine Stump <laine@laine.org>
Wed, 16 Oct 2019 18:06:54 +0000 (14:06 -0400)
committerLaine Stump <laine@redhat.com>
Fri, 8 Nov 2019 03:08:55 +0000 (22:08 -0500)
commitb596d6c106cd87d6d452c5dd4ad923a034544fbf
tree5f0001a493b62d331af3378155ffa351336b70f9
parent0de541bfc57563bc278bafdea2184ad1e5af1afa
util: allow sending mac addr to virNetNewLink without ifindex

Although until now, any use of the extra_args argument (a pointer to a
struct containing extra attributes to add the the RTM_NEWLINK message)
would always have the ifindex and mac set, so the code could assume it
was safe to add both to the message if extra_args != NULL. There is
now a use for setting a MAC address in the RTM_NEWLINK without setting
the ifindex, so we should check each of these separately.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/util/virnetlink.c