From owner-freebsd-ports Fri May 24 10:59:14 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mail.tcoip.com.br (cerberus.tcoip.com.br [200.220.254.3]) by hub.freebsd.org (Postfix) with ESMTP id D480537B405 for ; Fri, 24 May 2002 10:59:06 -0700 (PDT) Received: from tcoip.com.br ([192.168.60.194]) by mail.tcoip.com.br (8.11.6/8.11.6) with ESMTP id g4OHws425872; Fri, 24 May 2002 14:58:55 -0300 Message-ID: <3CEE7F5E.8070409@tcoip.com.br> Date: Fri, 24 May 2002 14:58:54 -0300 From: "Daniel C. Sobral" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0rc2) Gecko/20020520 X-Accept-Language: en, pt-br, ja MIME-Version: 1.0 To: minosh@engineer.com Cc: ports@freebsd.org Subject: FreeBSD vrrp port Content-Type: multipart/mixed; boundary="------------050409000902030003060500" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------050409000902030003060500 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ok, ok, it's not a correct implementation of vrrp, but unless there is something else in the ports that does the job and passed unnoticed by me, that's all I got. SO, here is a patch for a bug in the program. Namely, it always get the mac address from the first address. Possibly, this introduces a bit of memory leak, and I'm not sure if other bits of the code might not still be in error, but at least it works for me now. -- Daniel C. Sobral (8-DCS) Daniel.Sobral@tcoip.com.br dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net Expert, n.: Someone who comes from out of town and shows slides. --------------050409000902030003060500 Content-Type: text/plain; name="vrrpd.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vrrpd.patch" *** vrrpd.c Fri May 24 14:25:46 2002 --- vrrpd.c.new Fri May 24 14:27:39 2002 *************** *** 285,291 **** --- 285,303 ---- next += nextifm->ifm_msglen; } *size = addrcount; + } else { + next += ifm->ifm_msglen; + while (next < lim) { + nextifm = (struct if_msghdr *) next; + + if (nextifm->ifm_type != RTM_NEWADDR) + break; + + next += nextifm->ifm_msglen; + } } + if (strcmp(name, ifname) != 0) + continue; /* not the fucking same name */ if (addr != NULL) memcpy(addr, LLADDR(sdl), sizeof(*addr)); free(buf); return 0; --------------050409000902030003060500-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message