101-0002-Reinstate-initialisation-of-msghdr-fields.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From eaabcc1b09cccff2f8815d03da4d5778ab6bbd17 Mon Sep 17 00:00:00 2001
  2. From: Quentin Armitage <quentin@armitage.org.uk>
  3. Date: Mon, 16 May 2016 23:09:13 +0100
  4. Subject: [PATCH] Reinstate initialisation of msghdr fields
  5. Commit dbb2cac removed initialisation of the struct msghdr msg_control,
  6. msg_controllen and msg_flags fields. This commit reinstates initialisation
  7. of those fields.
  8. Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
  9. ---
  10. keepalived/vrrp/vrrp_netlink.c | 6 ++++++
  11. 1 file changed, 6 insertions(+)
  12. diff --git a/keepalived/vrrp/vrrp_netlink.c b/keepalived/vrrp/vrrp_netlink.c
  13. index 2c2fd59..62c37d6 100644
  14. --- a/keepalived/vrrp/vrrp_netlink.c
  15. +++ b/keepalived/vrrp/vrrp_netlink.c
  16. @@ -421,6 +421,9 @@ netlink_parse_info(int (*filter) (struct sockaddr_nl *, struct nlmsghdr *),
  17. .msg_namelen = sizeof(snl),
  18. .msg_iov = &iov,
  19. .msg_iovlen = 1,
  20. + .msg_control = NULL,
  21. + .msg_controllen = 0,
  22. + .msg_flags = 0
  23. };
  24. struct nlmsghdr *h;
  25. @@ -547,6 +550,9 @@ netlink_talk(nl_handle_t *nl, struct nlmsghdr *n)
  26. .msg_namelen = sizeof(snl),
  27. .msg_iov = &iov,
  28. .msg_iovlen = 1,
  29. + .msg_control = NULL,
  30. + .msg_controllen = 0,
  31. + .msg_flags = 0
  32. };
  33. memset(&snl, 0, sizeof snl);
  34. --
  35. 2.10.2