2014-07-16 05:19:00

by Varka Bhadram

[permalink] [raw]
Subject: [PATCH net-next] netlink: fix in netlink_filter_tap

From: Varka Bhadram <[email protected]>

Remove the bool variable 'pass'. Return the true/false directly.

Signed-off-by: Varka Bhadram <[email protected]>
---
net/netlink/af_netlink.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index e8c9f97..5dd8193 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -170,7 +170,6 @@ EXPORT_SYMBOL_GPL(netlink_remove_tap);
static bool netlink_filter_tap(const struct sk_buff *skb)
{
struct sock *sk = skb->sk;
- bool pass = false;

/* We take the more conservative approach and
* whitelist socket protocols that may pass.
@@ -184,11 +183,10 @@ static bool netlink_filter_tap(const struct sk_buff *skb)
case NETLINK_FIB_LOOKUP:
case NETLINK_NETFILTER:
case NETLINK_GENERIC:
- pass = true;
- break;
+ return true;
}

- return pass;
+ return false;
}

static int __netlink_deliver_tap_skb(struct sk_buff *skb,
--
1.7.9.5


2014-07-16 05:25:13

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net-next] netlink: fix in netlink_filter_tap

From: [email protected]
Date: Wed, 16 Jul 2014 10:47:24 +0530

> From: Varka Bhadram <[email protected]>
>
> Remove the bool variable 'pass'. Return the true/false directly.
>
> Signed-off-by: Varka Bhadram <[email protected]>

This doesn't "fix" anything, it's a cleanup.

Please resubmit this with a more correct commit header line and
commit message.