libvirt/src/util
Laine Stump 7c36650699 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 ac2797cf2a 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. :-/
2012-12-21 16:15:12 -05:00
..
iohelper.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
keymaps.csv Rsync keymaps.csv file with GTK-VNC 2012-01-12 20:44:55 +00:00
viralloc.c Rename memory.{c,h} to viralloc.{c,h} 2012-12-21 11:17:14 +00:00
viralloc.h Rename memory.{c,h} to viralloc.{c,h} 2012-12-21 11:17:14 +00:00
virarch.c Rename logging.{c,h} to virlog.{c,h} 2012-12-21 11:17:14 +00:00
virarch.h Introduce a set of APIs for managing architectures 2012-12-18 16:53:02 +00:00
viratomic.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
viratomic.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
viraudit.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
viraudit.h Change logging category parameter into an enum 2012-09-28 10:39:28 +01:00
virauth.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virauth.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virauthconfig.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virauthconfig.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virbitmap.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virbitmap.h Rename bitmap.{c,h} to virbitmap.{c,h} 2012-12-21 11:17:12 +00:00
virbuffer.c Rename memory.{c,h} to viralloc.{c,h} 2012-12-21 11:17:14 +00:00
virbuffer.h Rename buf.{c,h} to virbuffer.{c,h} 2012-12-21 11:17:12 +00:00
vircgroup.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
vircgroup.h Rename cgroup.{h,c} to vircgroup.{h,c} 2012-12-21 11:17:12 +00:00
vircommand.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
vircommand.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virconf.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virconf.h Rename conf.{c,h} to virconf.{c,h} 2012-12-21 11:17:13 +00:00
virdbus.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virdbus.h virdbus: Add virDBusGetSessionBus helper 2012-11-27 19:37:00 +00:00
virdnsmasq.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virdnsmasq.h Rename dnsmasq.{c,h} to virdnsmasq.{c,h} 2012-12-21 11:17:13 +00:00
virebtables.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virebtables.h Rename ebtables.{c,h} to virebtables.{c,h} 2012-12-21 11:17:13 +00:00
virerror.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virerror.h Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virevent.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virevent.h Rename event.{c,h} to virevent.{c,h} 2012-12-21 11:17:13 +00:00
vireventpoll.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
vireventpoll.h Rename event_poll.{c,h} to vireventpoll.{c,h} 2012-12-21 11:17:13 +00:00
virfile.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virfile.h qemu: Report errors from iohelper 2012-10-29 17:04:26 +01:00
virhash.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virhash.h Implement virHashRemoveAll function 2012-04-19 10:21:43 -04:00
virhashcode.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virhashcode.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virhook.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virhook.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virinitctl.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virinitctl.h Add APIs for talking to init via /dev/initctl 2012-11-30 19:17:30 +00:00
viriptables.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
viriptables.h Rename iptables.{c,h} to viriptables.{c,h} 2012-12-21 11:17:13 +00:00
virjson.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virjson.h Rename json.{c,h} to virjson.{c,h} 2012-12-21 11:17:13 +00:00
virkeycode-mapgen.py Fix keymap used to talk with QEMU 2011-08-26 14:18:57 +01:00
virkeycode.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virkeycode.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virkeyfile.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virkeyfile.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virlockspace.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virlockspace.h Rename json.{c,h} to virjson.{c,h} 2012-12-21 11:17:13 +00:00
virlog.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virlog.h Rename logging.{c,h} to virlog.{c,h} 2012-12-21 11:17:14 +00:00
virmacaddr.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virmacaddr.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virnetdev.c util: fix botched check for new netlink request filters 2012-12-21 16:15:12 -05:00
virnetdev.h Rename pci.{c,h} to virpci.{c,h} 2012-12-21 11:17:14 +00:00
virnetdevbandwidth.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevbandwidth.h bandwidth: Create rate update function 2012-12-11 18:36:55 +01:00
virnetdevbridge.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevbridge.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virnetdevmacvlan.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevmacvlan.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virnetdevopenvswitch.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevopenvswitch.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virnetdevtap.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevtap.h network: fix dnsmasq/radvd binding to IPv6 on recent kernels 2012-09-27 11:17:52 -06:00
virnetdevveth.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevveth.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virnetdevvlan.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevvlan.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virnetdevvportprofile.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetdevvportprofile.h Rename uuid.{c,h} to viruuid.{c,h} 2012-12-21 11:19:49 +00:00
virnetlink.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnetlink.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virnodesuspend.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virnodesuspend.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virobject.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virobject.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virpci.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virpci.h Rename pci.{c,h} to virpci.{c,h} 2012-12-21 11:17:14 +00:00
virpidfile.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virpidfile.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virprocess.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virprocess.h Merge processinfo.{c,h} into virprocess.{c,h} 2012-12-21 11:19:45 +00:00
virrandom.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virrandom.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsexpr.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virsexpr.h Rename sexpr.{c,h} to virsexpr.{c,h} 2012-12-21 11:19:48 +00:00
virsocketaddr.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virsocketaddr.h util: new virSocketAddrIsPrivate function 2012-11-29 15:02:39 -05:00
virstatslinux.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virstatslinux.h Rename stats_linux.{c,h} to virstatslinux.{c,h} 2012-12-21 11:19:48 +00:00
virstoragefile.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virstoragefile.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virstring.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virstring.h Introduce APIs for splitting/joining strings 2012-11-30 20:05:43 +00:00
virsysinfo.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virsysinfo.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virthread.c Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virthread.h Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virthreadpool.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virthreadpool.h Rename threadpool.{c,h} to virthreadpool.{c,h} 2012-12-21 11:19:48 +00:00
virthreadpthread.c Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virthreadpthread.h Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virthreadwin32.c Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virthreadwin32.h Rename threads.{c,h} to virthread.{c,h} 2012-12-21 11:19:49 +00:00
virtime.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virtime.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virtypedparam.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virtypedparam.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
viruri.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
viruri.h Fix crash accessing a NULL URI when looking up auth credentials 2012-09-21 10:13:53 +01:00
virusb.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virusb.h Rename hostusb.{c,h} to virusb.{c,h} 2012-12-21 11:17:13 +00:00
virutil.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virutil.h Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
viruuid.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
viruuid.h Rename uuid.{c,h} to viruuid.{c,h} 2012-12-21 11:19:49 +00:00
virxml.c Rename virterror.c virterror_internal.h to virerror.{c,h} 2012-12-21 11:19:50 +00:00
virxml.h Rename xml.{c,h} to virxml.{c,h} 2012-12-21 11:19:50 +00:00