Codebase list avahi / 61e0ac4
Fix wrong use of netlink flags for dump operations * 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 13 years ago
3 changed file(s) with 43 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
22 * debian/rules
33 - Enable stack smashing protector for all architectures and let configure
44 check if it is supported.
5 * debian/patches/04-fix_netlink_flags_for_dump_operations.patch
6 - Use correct flag combination for rtnetlink dump operations.
7 Thanks to Pablo Neira Ayuso for the patch. (Closes: #610281)
58
69 -- Michael Biebl <biebl@debian.org> Mon, 07 Mar 2011 09:06:42 +0100
710
0 commit 65cb5c100eb1e5891f145be0b89aaa3c2d2e4317
1 Author: Pablo Neira Ayuso <pablo@netfilter.org>
2 Date: Fri Feb 18 18:58:21 2011 +0100
3
4 netlink: fix wrong use of netlink flags for dump operations
5
6 The avahi-daemon uses a wrong flag combination to operate with
7 rtnetlink. This patch fixes the problems.
8
9 No need to set NLM_F_ACK since the dump operation already includes
10 the trailing NLMSG_DONE message that informs about the end of the
11 dump operation.
12
13 diff --git a/avahi-autoipd/iface-linux.c b/avahi-autoipd/iface-linux.c
14 index fc27829..83e9e41 100644
15 --- a/avahi-autoipd/iface-linux.c
16 +++ b/avahi-autoipd/iface-linux.c
17 @@ -262,7 +262,7 @@ int iface_get_initial_state(State *state) {
18 n->nlmsg_len = NLMSG_LENGTH(sizeof(*ifi));
19 n->nlmsg_type = RTM_GETLINK;
20 n->nlmsg_seq = seq;
21 - n->nlmsg_flags = NLM_F_MATCH|NLM_F_REQUEST|NLM_F_ACK;
22 + n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP;
23 n->nlmsg_pid = 0;
24
25 ifi = NLMSG_DATA(n);
26 diff --git a/avahi-core/iface-linux.c b/avahi-core/iface-linux.c
27 index a1b7f73..4d12f73 100644
28 --- a/avahi-core/iface-linux.c
29 +++ b/avahi-core/iface-linux.c
30 @@ -53,7 +53,7 @@ static int netlink_list_items(AvahiNetlink *nl, uint16_t type, unsigned *ret_seq
31 n = (struct nlmsghdr*) req;
32 n->nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg));
33 n->nlmsg_type = type;
34 - n->nlmsg_flags = NLM_F_ROOT|NLM_F_REQUEST;
35 + n->nlmsg_flags = NLM_F_REQUEST|NLM_F_DUMP;
36 n->nlmsg_pid = 0;
37
38 gen = NLMSG_DATA(n);
00 # Debian patches for Avahi
11 01_avahi-daemon.conf.patch
22 03_read_null_udp_packets.patch
3 04-fix_netlink_flags_for_dump_operations.patch