From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Lentini Subject: [iproute2] IPoIB link layer address bug Date: Thu, 16 Mar 2006 17:24:41 -0500 (EST) Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: netdev@vger.kernel.org, openib-general , lartc@mailman.ds9a.nl Return-path: To: shemminger@osdl.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openib-general-bounces@openib.org Errors-To: openib-general-bounces@openib.org List-Id: netdev.vger.kernel.org The ip(8) command has a bug when dealing with IPoIB link layer addresses. Specifically it does not correctly handle the addition of new entries in the neighbor/arp table. For example, this command will fail: ip neigh add 192.168.0.138 lladdr 00:00:04:04:fe:80:00:00:00:00:00:00:00:01:73:00:00:00:8a:91 nud permanent dev ib0 An IPoIB link layer address is 20-bytes (see http://www.ietf.org/internet-drafts/draft-ietf-ipoib-ip-over-infiniband-09.txt, section 9.1.1). The command line parsing code expects link layer addresses to be a maximum of 16-bytes. Addresses over 16-bytes are truncated. This patch (against the iproute2 cvs repository) fixes the problem: ============================================ --- iproute2/ip/ipneigh.c.orig 2005-09-01 15:21:50.000000000 -0400 +++ iproute2/ip/ipneigh.c 2006-03-16 17:03:41.339759000 -0500 @@ -165,7 +165,7 @@ static int ipneigh_modify(int cmd, int f addattr_l(&req.n, sizeof(req), NDA_DST, &dst.data, dst.bytelen); if (lla && strcmp(lla, "null")) { - char llabuf[16]; + char llabuf[20]; int l; l = ll_addr_a2n(llabuf, sizeof(llabuf), lla); ============================================ P.S. - I've found a similar issue with the arp command, see http://openib.org/pipermail/openib-general/2006-March/018270.html