netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6] ipconfig accepts any DHCPACK
@ 2004-09-07 21:46 Peter Buckingham
  2004-09-07 22:02 ` David S. Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Buckingham @ 2004-09-07 21:46 UTC (permalink / raw)
  To: davem; +Cc: netdev

Hi David,

I was playing around with using ipconfig to initialise a bunch of 
systems and it turns out that the ipconfig code doesn't check to see 
whether the ACK is for it or another system. I've just added a simple 
check to compare the hardware address of the device to the one in the 
packet.

peter

Signed-off-by: Peter Buckingham <peter@pantasys.com>

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-08  0:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-07 21:46 [PATCH 2.6] ipconfig accepts any DHCPACK Peter Buckingham
2004-09-07 22:02 ` David S. Miller
2004-09-07 22:45   ` Peter Buckingham
2004-09-07 22:43     ` David S. Miller
2004-09-08  0:12     ` Joe Perches
2004-09-08  0:18       ` Peter Buckingham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).