blob: 7bfe6687be6f17010e951822cf7d333a40e079f5 [file] [log] [blame]
From javier.martinez@collabora.co.uk Thu Jun 6 03:26:28 2013
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Date: Thu, 6 Jun 2013 12:25:51 +0200
Subject: [PATCH 3/6] netfilter: nfdbus: always accept when dest is an eavesdropper
To: Greg KH <gregkh@linuxfoundation.org>
Cc: ltsi-dev@lists.linuxfoundation.org, Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Message-ID: <1370514354-19114-4-git-send-email-javier.martinez@collabora.co.uk>
The D-Bus netfilter hook should always accept packets when the
destination socket is an eavesdropper.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
net/bus/nfdbus/nfdbus.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/net/bus/nfdbus/nfdbus.c
+++ b/net/bus/nfdbus/nfdbus.c
@@ -192,6 +192,12 @@ static unsigned int dbus_filter(unsigned
msg.member ? msg.member : "",
matchmaker);
+ if (sendctx->eavesdropper) {
+ pr_debug("The destination is an eavesdropper. ACCEPT.\n");
+ ret = NF_ACCEPT;
+ goto out;
+ }
+
if (!matchmaker) {
pr_debug("No match rules for this recipient. DROP.\n");
ret = NF_DROP;