lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1445129499-2496-1-git-send-email-masashi.honma@gmail.com>
Date:	Sun, 18 Oct 2015 09:51:39 +0900
From:	Masashi Honma <masashi.honma@...il.com>
To:	netdev@...r.kernel.org
Cc:	Masashi Honma <masashi.honma@...il.com>
Subject: [PATCH] ipv6 route: Aggregate table getting code

These lines could be aggregated to one line because fib6_new_table() calls
fib6_get_table() inside on both cases CONFIG_IPV6_MULTIPLE_TABLES is enabled or
not.

Signed-off-by: Masashi Honma <masashi.honma@...il.com>
---
 net/ipv6/route.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index cb32ce2..1ff4130 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1778,16 +1778,7 @@ int ip6_route_info_create(struct fib6_config *cfg, struct rt6_info **rt_ret)
 		cfg->fc_metric = IP6_RT_PRIO_USER;
 
 	err = -ENOBUFS;
-	if (cfg->fc_nlinfo.nlh &&
-	    !(cfg->fc_nlinfo.nlh->nlmsg_flags & NLM_F_CREATE)) {
-		table = fib6_get_table(net, cfg->fc_table);
-		if (!table) {
-			pr_warn("NLM_F_CREATE should be specified when creating new route\n");
-			table = fib6_new_table(net, cfg->fc_table);
-		}
-	} else {
-		table = fib6_new_table(net, cfg->fc_table);
-	}
+	table = fib6_new_table(net, cfg->fc_table);
 
 	if (!table)
 		goto out;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ