util: fix botched check for new netlink request filters
util: fix botched check for new netlink request filters

This is an adjustment to the fix for

  https://bugzilla.redhat.com/show_bug.cgi?id=889319

to account for two bonehead mistakes I made.

commit ac2797cf2af2fd0e64c58a48409a8175d24d6f86 attempted to fix a
problem with netlink in newer kernels requiring an extra attribute
with a filter flag set in order to receive an IFLA_VFINFO_LIST from
netlink. Unfortunately, the #ifdef that protected against compiling it
in on systems without the new flag went a bit too far, assuring that
the new code would *never* be compiled, and even if it had, the code
was incorrect.

The first problem was that, while some IFLA_* enum values are also
their existence at compile time, IFLA_EXT_MASK *isn't* #defined, so
checking to see if it's #defined is not a valid method of determining
whether or not to add the attribute. Fortunately, the flag that is
being set (RTEXT_FILTER_VF) *is* #defined, and it is never present if
IFLA_EXT_MASK isn't, so it's sufficient to just check for that flag.

And to top it off, due to the code not actually compiling when I
thought it did, I didn't realize that I'd been given the wrong arglist
to nla_put() - you can't just send a const value to nla_put, you have
to send it a pointer to memory containing what you want to add to the
message, along with the length of that memory.

This time I've actually sent the patch over to the other machine
that's experiencing the problem, applied it to the branch being used
(0.10.2) and verified that it works properly, i.e. it does fix the
problem it's supposed to fix. :-/

rlaager/libvirt,crobinso/libvirt,zhlcindy/libvirt-1.1.4-maintain,nertpinx/libvirt,fabianfreyer/libvirt,siboulet/libvirt-openvz,cbosdo/libvirt,taget/libvirt,VenkatDatta/libvirt,bjzhang/libvirt,shugaoye/libvirt,olafhering/libvirt,iam-TJ/libvirt,datto/libvirt,iam-TJ/libvirt,rlaager/libvirt,VenkatDatta/libvirt,cbosdo/libvirt,libvirt/libvirt,iam-TJ/libvirt,jardasgit/libvirt,elmarco/libvirt,trainstack/libvirt,elmarco/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,agx/libvirt,andreabolognani/libvirt,crobinso/libvirt,bjzhang/libvirt,shugaoye/libvirt,cbosdo/libvirt,crobinso/libvirt,jfehlig/libvirt,trainstack/libvirt,libvirt/libvirt,eskultety/libvirt,iam-TJ/libvirt,olafhering/libvirt,jfehlig/libvirt,eskultety/libvirt,siboulet/libvirt-openvz,olafhering/libvirt,iam-TJ/libvirt,zippy2/libvirt,taget/libvirt,elmarco/libvirt,eskultety/libvirt,VenkatDatta/libvirt,agx/libvirt,cbosdo/libvirt,trainstack/libvirt,jfehlig/libvirt,jardasgit/libvirt,bjzhang/libvirt,eskultety/libvirt,shugaoye/libvirt,bjzhang/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,shugaoye/libvirt,olafhering/libvirt,datto/libvirt,zippy2/libvirt,rlaager/libvirt,andreabolognani/libvirt,nertpinx/libvirt,datto/libvirt,nertpinx/libvirt,cbosdo/libvirt,taget/libvirt,elmarco/libvirt,libvirt/libvirt,crobinso/libvirt,trainstack/libvirt,taget/libvirt,nertpinx/libvirt,agx/libvirt,siboulet/libvirt-openvz,zhlcindy/libvirt-1.1.4-maintain,fabianfreyer/libvirt,jfehlig/libvirt,rlaager/libvirt,bjzhang/libvirt,jardasgit/libvirt,trainstack/libvirt,zippy2/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,iam-TJ/libvirt,libvirt/libvirt,andreabolognani/libvirt,rlaager/libvirt,trainstack/libvirt,zhlcindy/libvirt-1.1.4-maintain,siboulet/libvirt-openvz,andreabolognani/libvirt,agx/libvirt,shugaoye/libvirt,agx/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,eskultety/libvirt,zhlcindy/libvirt-1.1.4-maintain,taget/libvirt,andreabolognani/libvirt,siboulet/libvirt-openvz,trainstack/libvirt,nertpinx/libvirt,datto/libvirt,datto/libvirt,iam-TJ/libvirt,elmarco/libvirt,zippy2/libvirt