[libvirt] [PATCH 4/4] DEBUG: print out netlink message.
Doug Goldstein
cardoe at gentoo.org
Tue Aug 21 15:11:30 UTC 2012
On Tue, Aug 21, 2012 at 5:12 AM, Tang Chen <tangchen at cn.fujitsu.com> wrote:
> Signed-off-by: Tang Chen <tangchen at cn.fujitsu.com>
> ---
> src/util/virnetlink.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
> index fff98f1..3e6f26a 100644
> --- a/src/util/virnetlink.c
> +++ b/src/util/virnetlink.c
> @@ -342,6 +342,8 @@ virNetlinkEventCallback(int watch,
> return;
> }
>
> + VIR_DEBUG("Netlink msg: %s", msg);
Netlink messages aren't guaranteed to be printable characters or NULL
terminated strings. A lot of times they are binary structures tossed
from the kernel to user space and printing them like this could lead
to bad things.
> +
> virNetlinkEventServerLock(srv);
>
> VIR_DEBUG("dispatching to max %d clients, called from event watch %d",
> --
> 1.7.10.1
>
--
Doug Goldstein
More information about the libvir-list
mailing list