Skip to content

Commit b8f3ab4

Browse files
committed
Revert "netlink: test for all flags of the NLM_F_DUMP composite"
This reverts commit 0ab03c2. It breaks several things including the avahi daemon. Signed-off-by: David S. Miller <[email protected]>
1 parent ff76015 commit b8f3ab4

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

net/core/rtnetlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
18201820
if (kind != 2 && security_netlink_recv(skb, CAP_NET_ADMIN))
18211821
return -EPERM;
18221822

1823-
if (kind == 2 && (nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) {
1823+
if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
18241824
struct sock *rtnl;
18251825
rtnl_dumpit_func dumpit;
18261826

net/ipv4/inet_diag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
858858
nlmsg_len(nlh) < hdrlen)
859859
return -EINVAL;
860860

861-
if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) {
861+
if (nlh->nlmsg_flags & NLM_F_DUMP) {
862862
if (nlmsg_attrlen(nlh, hdrlen)) {
863863
struct nlattr *attr;
864864

net/netfilter/nf_conntrack_netlink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
924924
u16 zone;
925925
int err;
926926

927-
if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP)
927+
if (nlh->nlmsg_flags & NLM_F_DUMP)
928928
return netlink_dump_start(ctnl, skb, nlh, ctnetlink_dump_table,
929929
ctnetlink_done);
930930

@@ -1787,7 +1787,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
17871787
u16 zone;
17881788
int err;
17891789

1790-
if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) {
1790+
if (nlh->nlmsg_flags & NLM_F_DUMP) {
17911791
return netlink_dump_start(ctnl, skb, nlh,
17921792
ctnetlink_exp_dump_table,
17931793
ctnetlink_exp_done);

net/netlink/genetlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
519519
security_netlink_recv(skb, CAP_NET_ADMIN))
520520
return -EPERM;
521521

522-
if ((nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) {
522+
if (nlh->nlmsg_flags & NLM_F_DUMP) {
523523
if (ops->dumpit == NULL)
524524
return -EOPNOTSUPP;
525525

net/xfrm/xfrm_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2189,7 +2189,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
21892189

21902190
if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) ||
21912191
type == (XFRM_MSG_GETPOLICY - XFRM_MSG_BASE)) &&
2192-
(nlh->nlmsg_flags & NLM_F_DUMP) == NLM_F_DUMP) {
2192+
(nlh->nlmsg_flags & NLM_F_DUMP)) {
21932193
if (link->dump == NULL)
21942194
return -EINVAL;
21952195

0 commit comments

Comments
 (0)