avahi: fix wrong use of netlink flags for dump operations The avahi-daemon uses a wrong flag combination to operate with rtnetlink. This patch fixes the problems. No need to set NLM_F_ACK since the dump operation already includes the trailing NLMSG_DONE message that informs about the end of the dump operation. Please, consider porting the avahi-daemon to libmnl: http://www.netfilter.org/projects/libmnl/index.html Signed-off-by: Pablo Neira Ayuso Index: avahi-0.6.27/avahi-autoipd/iface-linux.c =================================================================== --- avahi-0.6.27.orig/avahi-autoipd/iface-linux.c 2011-01-16 22:06:20.000000000 +0100 +++ avahi-0.6.27/avahi-autoipd/iface-linux.c 2011-01-16 22:07:34.000000000 +0100 @@ -262,7 +262,7 @@ int iface_get_initial_state(State *state n->nlmsg_len = NLMSG_LENGTH(sizeof(*ifi)); n->nlmsg_type = RTM_GETLINK; n->nlmsg_seq = seq; - n->nlmsg_flags = NLM_F_MATCH|NLM_F_REQUEST|NLM_F_ACK; + n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP; n->nlmsg_pid = 0; ifi = NLMSG_DATA(n); Index: avahi-0.6.27/avahi-core/iface-linux.c =================================================================== --- avahi-0.6.27.orig/avahi-core/iface-linux.c 2011-01-16 22:06:51.000000000 +0100 +++ avahi-0.6.27/avahi-core/iface-linux.c 2011-01-16 22:07:08.000000000 +0100 @@ -53,7 +53,7 @@ static int netlink_list_items(AvahiNetli n = (struct nlmsghdr*) req; n->nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg)); n->nlmsg_type = type; - n->nlmsg_flags = NLM_F_ROOT|NLM_F_REQUEST; + n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP; n->nlmsg_pid = 0; gen = NLMSG_DATA(n);