Subject: Re: [PATCH 2.6] ipconfig accepts any DHCPACK

From: Joe Perches <[email-masked]>
Date: Tue, 07 Sep 2004 17:12:11 -0700

On Tue, 2004-09-07 at 15:45, Peter Buckingham wrote: 
> is this okay?
> +				for (i = 0; (dev->dev_addr[i] == b->hw_addr[i])
> +						&& (i < dev->addr_len); i++);
> +				if (i < dev->addr_len)
> +					goto drop_unlock;
> +

I had to read that twice.

How about something like:

	for (i=0;i<dev->addr_len;i++)
		if (dev->dev_addr[i] != b->hw_addr[i])
			goto drop_unlock;

or

	if (memcmp(dev->dev_addr, b->hw_addr, dev->addr_len)!=0)
		goto drop_unlock;

instead?