Skip to contentSkip to conversation

iputils: arping fails to set correct broadcast address

PATCH Applied Jesper Dangaard Brouer 2 participants 2 messages Aug 13, 2010 – Sep 16, 2010

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

PATCH 1/1 iputils: arping fails to set correct broadcast address

From: Paul Martin <[email protected]>

There seems to have been introduced a bug in iputils release s20100418.

This patch is based upon git://www.linux-ipv6.org/gitroot/iputils.git
(git commit fe342ca3148)

The regression is caused by commit 56018bf1b3
arping: Support link-layer type with larger link-layer address.

As reported by: Paul Martin <[email protected]> in Debian bugreport #585591.

There's a logic error in the function that parses the interface's broadcast address, causing it not to fill the broadcast address array correctly.

Please apply.

---
 arping.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arping.c +1 -1
index 9bd6927..2613a12 100644
@@ -336,7 +336,7 @@ void set_device_broadcast(char *device, unsigned char *ba, size_t balen)
 	}
 
 	for (p = ba, ch = 0; p < ba + balen; p++, ch += 3)
-		*p++ = strtoul(brdcast->value + ch * 3, NULL, 16);
+		*p = strtoul(brdcast->value + ch, NULL, 16);
 
 	return;
 }
#1 lore raw

Hello.

Quoted 17 lines · Jesper Dangaard Brouer

From: Paul Martin<[email protected]>

There seems to have been introduced a bug in iputils release s20100418.

This patch is based upon git://www.linux-ipv6.org/gitroot/iputils.git
(git commit fe342ca3148)

The regression is caused by commit 56018bf1b3
arping: Support link-layer type with larger link-layer address.

As reported by: Paul Martin<[email protected]> in Debian bugreport #585591.

There's a logic error in the function that parses the interface's broadcast address, causing it not to fill the broadcast address array correctly.

Quoted 5 lines

Please apply.

Applied. Thank you very much!

--yoshfuji