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

From: Peter Buckingham <[email-masked]>
Date: Tue, 07 Sep 2004 17:18:17 -0700

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

I prefer this one.

Signed-off-by: Peter Buckingham <[email-masked]>

--- linus-2.6/net/ipv4/ipconfig.c	2004-09-02 14:53:54.000000000 -0700
+++ local_linux/net/ipv4/ipconfig.c	2004-09-07 17:16:55.000000000 -0700
@@ -966,6 +966,9 @@ static int __init ic_bootp_recv(struct s
  				break;

  			case DHCPACK:
+				if (memcmp(dev->dev_addr, b->hw_addr, dev->addr_len) != 0)
+					goto drop_unlock;
+
  				/* Yeah! */
  				break;