diff options
| author | David S. Miller <davem@davemloft.net> | 2011-01-18 15:40:38 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-01-19 16:34:20 -0500 |
| commit | b8f3ab4290f1e720166e888ea2a1d1d44c4d15dd (patch) | |
| tree | 88d5b71b27ed9ca0b5d67bd6ae61f592fb61fdc5 | |
| parent | ff76015f3bdfbc482c723cb4f2559cef84d178ca (diff) | |
Revert "netlink: test for all flags of the NLM_F_DUMP composite"
This reverts commit 0ab03c2b1478f2438d2c80204f7fef65b1bca9cf.
It breaks several things including the avahi daemon.
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/core/rtnetlink.c | 2 | ||||
| -rw-r--r-- | net/ipv4/inet_diag.c | 2 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 4 | ||||
| -rw-r--r-- | net/netlink/genetlink.c | 2 | ||||
| -rw-r--r-- | net/xfrm/xfrm_user.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index a5f7535aab5b..750db57f3bb3 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
| @@ -1820,7 +1820,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 1820 | if (kind != 2 && security_netlink_recv(skb, CAP_NET_ADMIN)) | 1820 | if (kind != 2 && security_netlink_recv(skb, CAP_NET_ADMIN)) |
| 1821 | return -EPERM; | 1821 | return -EPERM; |
| 1822 | 1822 | ||
| 1823 | if (kind == 2 && (nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) { | 1823 | if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) { |
| 1824 | struct sock *rtnl; | 1824 | struct sock *rtnl; |
| 1825 | rtnl_dumpit_func dumpit; | 1825 | rtnl_dumpit_func dumpit; |
| 1826 | 1826 | ||
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 2746c1fa6417..2ada17129fce 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
| @@ -858,7 +858,7 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 858 | nlmsg_len(nlh) < hdrlen) | 858 | nlmsg_len(nlh) < hdrlen) |
| 859 | return -EINVAL; | 859 | return -EINVAL; |
| 860 | 860 | ||
| 861 | if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) { | 861 | if (nlh->nlmsg_flags & NLM_F_DUMP) { |
| 862 | if (nlmsg_attrlen(nlh, hdrlen)) { | 862 | if (nlmsg_attrlen(nlh, hdrlen)) { |
| 863 | struct nlattr *attr; | 863 | struct nlattr *attr; |
| 864 | 864 | ||
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 2b7eef37875c..93297aaceb2b 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
| @@ -924,7 +924,7 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb, | |||
| 924 | u16 zone; | 924 | u16 zone; |
| 925 | int err; | 925 | int err; |
| 926 | 926 | ||
| 927 | if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) | 927 | if (nlh->nlmsg_flags & NLM_F_DUMP) |
| 928 | return netlink_dump_start(ctnl, skb, nlh, ctnetlink_dump_table, | 928 | return netlink_dump_start(ctnl, skb, nlh, ctnetlink_dump_table, |
| 929 | ctnetlink_done); | 929 | ctnetlink_done); |
| 930 | 930 | ||
| @@ -1787,7 +1787,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, | |||
| 1787 | u16 zone; | 1787 | u16 zone; |
| 1788 | int err; | 1788 | int err; |
| 1789 | 1789 | ||
| 1790 | if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) { | 1790 | if (nlh->nlmsg_flags & NLM_F_DUMP) { |
| 1791 | return netlink_dump_start(ctnl, skb, nlh, | 1791 | return netlink_dump_start(ctnl, skb, nlh, |
| 1792 | ctnetlink_exp_dump_table, | 1792 | ctnetlink_exp_dump_table, |
| 1793 | ctnetlink_exp_done); | 1793 | ctnetlink_exp_done); |
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index f83cb370292b..1781d99145e2 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
| @@ -519,7 +519,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 519 | security_netlink_recv(skb, CAP_NET_ADMIN)) | 519 | security_netlink_recv(skb, CAP_NET_ADMIN)) |
| 520 | return -EPERM; | 520 | return -EPERM; |
| 521 | 521 | ||
| 522 | if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) { | 522 | if (nlh->nlmsg_flags & NLM_F_DUMP) { |
| 523 | if (ops->dumpit == NULL) | 523 | if (ops->dumpit == NULL) |
| 524 | return -EOPNOTSUPP; | 524 | return -EOPNOTSUPP; |
| 525 | 525 | ||
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index d5e1e0b08890..61291965c5f6 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
| @@ -2189,7 +2189,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 2189 | 2189 | ||
| 2190 | if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) || | 2190 | if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) || |
| 2191 | type == (XFRM_MSG_GETPOLICY - XFRM_MSG_BASE)) && | 2191 | type == (XFRM_MSG_GETPOLICY - XFRM_MSG_BASE)) && |
| 2192 | (nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) { | 2192 | (nlh->nlmsg_flags & NLM_F_DUMP)) { |
| 2193 | if (link->dump == NULL) | 2193 | if (link->dump == NULL) |
| 2194 | return -EINVAL; | 2194 | return -EINVAL; |
| 2195 | 2195 | ||
