Date: Fri, 24 May 2002 14:58:54 -0300 From: "Daniel C. Sobral" <daniel.sobral@tcoip.com.br> To: minosh@engineer.com Cc: ports@freebsd.org Subject: FreeBSD vrrp port Message-ID: <3CEE7F5E.8070409@tcoip.com.br>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CEE7F5E.8070409>