Skip to contentSkip to conversation

isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply

PATCH Applied Harvey Harrison 2 participants 3 messages Nov 17, 2008

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

PATCH 1/1 isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply

commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 [IPV4]: annotate struct in_ifaddr

Missed this extra byteswap as the isdn inlines hide the htonl inside put_u32 which causes an extra byteswap on little-endian arches.

---
Dave, this is the minimal patch suitable to fix mainline without any net-next material mixed in. I'd suggest sending this one to Linus and then applying my previous patch to net-next (if you need a resend, just ask)

Then whenever you do your net-next merge with Linus, the resolution should be trivial.

Harvey

 drivers/isdn/i4l/isdn_net.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/isdn/i4l/isdn_net.c +4 -2
index bb904a0..1bfc55d 100644
@@ -1641,8 +1641,10 @@ isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp)
 	/* slarp reply, send own ip/netmask; if values are nonsense remote
 	 * should think we are unable to provide it with an address via SLARP */
 	p += put_u32(p, CISCO_SLARP_REPLY);
-	p += put_u32(p, addr);	// address
-	p += put_u32(p, mask);	// netmask
+	*(__be32 *)p = addr;	// address
+	p += 4;
+	*(__be32 *)p = mask;	// netmask
+	p += 4;
 	p += put_u16(p, 0);	// unused
 
 	isdn_net_write_super(lp, skb);
Signature · 1 line
1.6.0.4.994.g16bd3e
maintainer Applied
#1 lore raw

From: Harvey Harrison <[email protected]>
Date: Sun, 16 Nov 2008 20:18:36 -0800

Quoted 6 lines

commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 [IPV4]: annotate struct in_ifaddr

Missed this extra byteswap as the isdn inlines hide the htonl inside put_u32 which causes an extra byteswap on little-endian arches.

Applied, thanks.

Quoted 5 lines

Dave, this is the minimal patch suitable to fix mainline without any net-next material mixed in. I'd suggest sending this one to Linus and then applying my previous patch to net-next (if you need a resend, just ask)

Then whenever you do your net-next merge with Linus, the resolution should be trivial.

Please resend when I do my merges after Linus takes the change, I'll announce this on netdev as I always do.

#2 lore raw
Quoted 12 lines · David Miller

From: Harvey Harrison <[email protected]>
Date: Sun, 16 Nov 2008 20:18:36 -0800

Quoted 6 lines

commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 [IPV4]: annotate struct in_ifaddr

Missed this extra byteswap as the isdn inlines hide the htonl inside put_u32 which causes an extra byteswap on little-endian arches.

Applied, thanks.

Quoted 8 lines
Quoted 5 lines

Dave, this is the minimal patch suitable to fix mainline without any net-next material mixed in. I'd suggest sending this one to Linus and then applying my previous patch to net-next (if you need a resend, just ask)

Then whenever you do your net-next merge with Linus, the resolution should be trivial.

Please resend when I do my merges after Linus takes the change, I'll announce this on netdev as I always do.

OK, will do.

Harvey