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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180927230017.15398-4-zenczykowski@gmail.com>
Date:   Thu, 27 Sep 2018 16:00:10 -0700
From:   "Maciej Żenczykowski" <zenczykowski@...il.com>
To:     "Maciej Żenczykowski" <maze@...gle.com>,
        "David S . Miller" <davem@...emloft.net>
Cc:     netdev@...r.kernel.org
Subject: [PATCH 04/11] net: ip6_multipath_l3_keys() - use new style struct
 initializer instead of memset

From: Maciej Żenczykowski <maze@...gle.com>

Signed-off-by: Maciej Żenczykowski <maze@...gle.com>
---
 net/ipv6/route.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d28f83e01593..9cb024451fc5 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1981,12 +1981,11 @@ static void ip6_multipath_l3_keys(const struct sk_buff *skb,
 u32 rt6_multipath_hash(const struct net *net, const struct flowi6 *fl6,
 		       const struct sk_buff *skb, struct flow_keys *flkeys)
 {
-	struct flow_keys hash_keys;
+	struct flow_keys hash_keys = {};
 	u32 mhash;
 
 	switch (ip6_multipath_hash_policy(net)) {
 	case 0:
-		memset(&hash_keys, 0, sizeof(hash_keys));
 		hash_keys.control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
 		if (skb) {
 			ip6_multipath_l3_keys(skb, &hash_keys, flkeys);
@@ -2006,8 +2005,6 @@ u32 rt6_multipath_hash(const struct net *net, const struct flowi6 *fl6,
 			if (skb->l4_hash)
 				return skb_get_hash_raw(skb) >> 1;
 
-			memset(&hash_keys, 0, sizeof(hash_keys));
-
                         if (!flkeys) {
 				skb_flow_dissect_flow_keys(skb, &keys, flag);
 				flkeys = &keys;
@@ -2019,7 +2016,6 @@ u32 rt6_multipath_hash(const struct net *net, const struct flowi6 *fl6,
 			hash_keys.ports.dst = flkeys->ports.dst;
 			hash_keys.basic.ip_proto = flkeys->basic.ip_proto;
 		} else {
-			memset(&hash_keys, 0, sizeof(hash_keys));
 			hash_keys.control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
 			hash_keys.addrs.v6addrs.src = fl6->saddr;
 			hash_keys.addrs.v6addrs.dst = fl6->daddr;
-- 
2.19.0.605.g01d371f741-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ