LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] IPVS sync endianess fixed

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] IPVS sync endianess fixed
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Thu, 30 Sep 2004 13:03:46 +0200
Hi,

 There was a small bug in the ip_vs_sync.c code that made it impossible
for 2 servers of different endian to sync with eachother (eg. a sparc
(big endian) and a i386 (little endian) based system). The problem was

You're the first one I know to mix big with little endian within LVS' realm.

in the message size. All other data seems to be correctly rearranged to
network byte order except for this one (probably because the size is
used from the moment the data is being gathered to the moment it is send).
 This caused "IPVS: bogus message" messages in my dmesg.

Make sense. Nice catch and nice code cleanup ;).

 This patch fixes this problem by converting the m->size at the last
moment before sending it to network byte order. And changing it back to
host order right before the message is processed. The patch is made
agains the Linux kernel version 2.6.8.1.

It should appear in 2.6.9. Linus just released 2.6.9-rc3.

Special credit goes to: Byte Internetdiensten (my current employer) for
supplying the testbed that triggered this bug and the time sponsored to
fix it.

Thank you.

ps. Congratulations on the great work, the code is good and the
functionality great :)

Best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
<Prev in Thread] Current Thread [Next in Thread>