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]
Date:   Tue, 6 Feb 2018 19:19:25 -0700
From:   David Ahern <dsahern@...il.com>
To:     Serhey Popovych <serhe.popovych@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next 4/6] iptunnel/ip6tunnel: Code cleanups

On 2/6/18 7:16 PM, David Ahern wrote:
> On 2/2/18 6:10 AM, Serhey Popovych wrote:
>> @@ -414,15 +428,18 @@ static int do_tunnels_list(struct ip_tunnel_parm *p)
>>  			fprintf(stderr, "Failed to get type of \"%s\"\n", name);
>>  			continue;
>>  		}
>> -		if (type != ARPHRD_TUNNEL && type != ARPHRD_IPGRE && type != ARPHRD_SIT)
>> +		switch (type) {
>> +		case ARPHRD_TUNNEL:
>> +		case ARPHRD_IPGRE:
>> +		case ARPHRD_SIT:
>> +			break;
>> +		default:
>>  			continue;
>> +		}
>> +		memset(p1, 0, sizeof(p1));
> 
> Shouldn't that be &p1 for the first arg? I get a compile failure:
> 
> ip
>     CC       iptunnel.o
>     CC       ip6tunnel.o
> iptunnel.c: In function ‘do_tunnels_list’:
> iptunnel.c:439:10: error: incompatible type for argument 1 of ‘memset’
>    memset(p1, 0, sizeof(p1));
>           ^~
> In file included from iptunnel.c:15:0:
> /usr/include/string.h:62:14: note: expected ‘void *’ but argument is of
> type ‘struct ip_tunnel_parm’
>  extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull
> ((1));
>               ^~~~~~
> ../config.mk:48: recipe for target 'iptunnel.o' failed
> 

Fixed by patch 5 which deletes do_tunnels_list. So why have a cleanup
patch that changes code you then delete?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ