[Debian-ha-maintainers] Bug#723739: resource-agents: send_arp sends incorrect arp packets on big endian machines with 64bit wide u_long datatype.

Martin Grimm extern.martin.grimm at zivit.de
Thu Sep 19 11:29:02 UTC 2013


Package: resource-agents
Version: 1:3.9.2-5+deb7u1
Severity: important
Tags: upstream patch

Dear Maintainer,

The send_arp binary (libnet-version) doesn't work on big endian systems
that use 64bit for datatype u_long. In our case this means that
heartbeat with VIPs doesn't work because the needed ARP broadcast on IP
failover is broken.

Network traces showed that instead of the ip given on commandline 0.0.0.0
was used in all packets.

The problem  is caused by incorrect use of u_long as return value of
libnet_name2addr4 (libnet1.1 version returns u_int32_t). This variable
is casted to u_char* and given to libnet_build_arp, which copies the
first 4 bytes to the arp packet. On big endian systems with 64bit wide
long datatype these 4 bytes are 0x00 and the ip is in byte 5 to 8.

Attached patch changes the type of the variable ip to u_int32_t for
libnet1.1-code.

The problem seems to be fixed in latest upstream version. The fix in
upstream can be seen here:
https://github.com/ClusterLabs/resource-agents/commit/1eea8a6cb3b6a58908276b23e66ce282b1733c9e

Greetings,
Martin

-- System Information:
Debian Release: 7.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: s390x

Kernel: Linux 3.2.0-4zivit1-s390x (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages resource-agents depends on:
ii  cluster-glue  1.0.9+hg2665-1
ii  libc6         2.13-38
ii  libglib2.0-0  2.33.12+really2.32.4-5
ii  libnet1       1.1.4-2.1
ii  libplumb2     1.0.9+hg2665-1
ii  libplumbgpl2  1.0.9+hg2665-1
ii  python        2.7.3-4

resource-agents recommends no packages.

resource-agents suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: send_arp.libnet.c.patch
Type: text/x-diff
Size: 1513 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-ha-maintainers/attachments/20130919/7ea970ae/attachment.patch>


More information about the Debian-ha-maintainers mailing list