Skip to contentSkip to conversation

IPCONFIG fix and cleanup

PATCH Applied Peter Buckingham 3 participants 5 messages Sep 9, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPCONFIG fix and cleanup

Hi David,

The previous fix to DHCPACK missed declaring an iterator variable. based on some comments I modified the patch to look like the below. This will fix the promisicuous DHCPACK problem.

thanks,

peter

net/ipv4/ipconfig.c +1 -3
@@ -966,9 +966,7 @@ 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)
+				if (memcmp(dev->dev_addr, b->hw_addr, dev->addr_len) != 0)
 					goto drop_unlock;
 
 				/* Yeah! */
#1 lore raw
Quoted 3 lines · On Wed, 08 Sep 2004 17:43:18 -0700 Peter Buckingham <[email protected]> wrote:

The previous fix to DHCPACK missed declaring an iterator variable. based on some comments I modified the patch to look like the below. This will fix the promisicuous DHCPACK problem.

Peter, how are you generating your patches? They never apply cleanly. Maybe Mozilla is messing it up, who knows. Perhaps try using attachments instead.

#2 lore raw
Quoted 3 lines

Peter, how are you generating your patches? They never apply cleanly. Maybe Mozilla is messing it up, who knows. Perhaps try using attachments instead.

sorry, try this attachment instead. when i get sendmail configured properly i'll use mutt instead ;-)

peter

net/ipv4/ipconfig.c +1 -3
@@ -966,9 +966,7 @@ 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)
+				if (memcmp(dev->dev_addr, b->hw_addr, dev->addr_len) != 0)
 					goto drop_unlock;
 
 				/* Yeah! */
maintainer Applied
#3 lore raw
Quoted 6 lines · On Wed, 08 Sep 2004 17:54:27 -0700 Peter Buckingham <[email protected]> wrote:
Quoted 3 lines

Peter, how are you generating your patches? They never apply cleanly. Maybe Mozilla is messing it up, who knows. Perhaps try using attachments instead.

sorry, try this attachment instead. when i get sendmail configured properly i'll use mutt instead ;-)

Applied, thanks.

BTW I put the full fix into my 2.4.x tree as well and will push that to Marcelo when I get the chance.

#4 lore raw
Quoted 4 lines · David S. Miller

Applied, thanks.

BTW I put the full fix into my 2.4.x tree as well and will push that to Marcelo when I get the chance.

cool, thanks.

peter