Skip to content

Commit

Permalink
netfilter: ctnetlink: fix echo if not subscribed to any multicast group
Browse files Browse the repository at this point in the history
This patch fixes echoing if the socket that has sent the request to
create/update/delete an entry is not subscribed to any multicast
group. With the current code, ctnetlink would not send the echo
message via unicast as nfnetlink_send() would be skip.

Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ummakynes authored and davem330 committed Feb 9, 2009
1 parent c969aa7 commit 1f9da25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
} else
return NOTIFY_DONE;

if (!nfnetlink_has_listeners(group))
if (!item->report && !nfnetlink_has_listeners(group))
return NOTIFY_DONE;

skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC);
Expand Down Expand Up @@ -1502,7 +1502,8 @@ static int ctnetlink_expect_event(struct notifier_block *this,
} else
return NOTIFY_DONE;

if (!nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW))
if (!item->report &&
!nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW))
return NOTIFY_DONE;

skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC);
Expand Down

0 comments on commit 1f9da25

Please sign in to comment.