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

From: Peter Buckingham <[email-masked]>
Date: Tue, 07 Sep 2004 15:45:06 -0700

David S. Miller wrote:
  > Just because there are 16 bytes of hw address in the bootp packet
> layout doesn't mean the device actually has that many.  Please fix
> it to use dev->addr_len.
> 

is this okay?

peter

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 15:43:39.000000000 -0700
@@ -966,6 +966,11 @@ static int __init ic_bootp_recv(struct s
  				break;

  			case DHCPACK:
+				for (i = 0; (dev->dev_addr[i] == b->hw_addr[i])
+						&& (i < dev->addr_len); i++);
+				if (i < dev->addr_len)
+					goto drop_unlock;
+
  				/* Yeah! */
  				break;