mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
macvtap: work-around for 2.6.32 and older kernels
This patch works around a recent extension of the netlink driver I had made use of when building the netlink messages. Unfortunately older kernels don't accept IFLA_IFNAME + name of interface as a replacement for the interface's index, so this patch now gets the interface index ifindex if it's not provided (ifindex <= 0).
This commit is contained in:
parent
07be2403b6
commit
045a5722ab
@ -905,6 +905,9 @@ ifaceGetNthParent(int ifindex, const char *ifname, unsigned int nthParent,
|
|||||||
|
|
||||||
*nth = 0;
|
*nth = 0;
|
||||||
|
|
||||||
|
if (ifindex <= 0 && ifaceGetIndex(true, ifname, &ifindex) != 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
while (!end && i <= nthParent) {
|
while (!end && i <= nthParent) {
|
||||||
rc = link_dump(true, ifname, ifindex, tb, &recvbuf);
|
rc = link_dump(true, ifname, ifindex, tb, &recvbuf);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
Loading…
Reference in New Issue
Block a user