diff --git a/debian/changelog b/debian/changelog index 04b7864..9901d3d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ * debian/rules - Enable stack smashing protector for all architectures and let configure check if it is supported. + * debian/patches/04-fix_netlink_flags_for_dump_operations.patch + - Use correct flag combination for rtnetlink dump operations. + Thanks to Pablo Neira Ayuso for the patch. (Closes: #610281) -- Michael Biebl Mon, 07 Mar 2011 09:06:42 +0100 diff --git a/debian/patches/04-fix_netlink_flags_for_dump_operations.patch b/debian/patches/04-fix_netlink_flags_for_dump_operations.patch new file mode 100644 index 0000000..d185c51 --- /dev/null +++ b/debian/patches/04-fix_netlink_flags_for_dump_operations.patch @@ -0,0 +1,39 @@ +commit 65cb5c100eb1e5891f145be0b89aaa3c2d2e4317 +Author: Pablo Neira Ayuso +Date: Fri Feb 18 18:58:21 2011 +0100 + + netlink: 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. + +diff --git a/avahi-autoipd/iface-linux.c b/avahi-autoipd/iface-linux.c +index fc27829..83e9e41 100644 +--- a/avahi-autoipd/iface-linux.c ++++ b/avahi-autoipd/iface-linux.c +@@ -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); +diff --git a/avahi-core/iface-linux.c b/avahi-core/iface-linux.c +index a1b7f73..4d12f73 100644 +--- a/avahi-core/iface-linux.c ++++ b/avahi-core/iface-linux.c +@@ -53,7 +53,7 @@ static int netlink_list_items(AvahiNetlink *nl, uint16_t type, unsigned *ret_seq + 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); diff --git a/debian/patches/series b/debian/patches/series index 276b2d0..1b0a7d0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ # Debian patches for Avahi 01_avahi-daemon.conf.patch 03_read_null_udp_packets.patch +04-fix_netlink_flags_for_dump_operations.patch