On Fri, Jan 07, 2011 at 05:30:41PM +0800, b...@hkbsd.com wrote: > Dear all, > > Currently we are testing BIRD 1.2.5 at our Lab and found that there a > illegal Character for NIC. We have tried install 1.2.4 and 1.2.5 even > reinstall the OS. It still appear that illegal Character.
There is a bug in BSD code that is probably triggered by some changes in newer BSD systems. You can use attached patch or the one from Aragon Gouveia. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
commit dad7ee70c1711b2cbdfd86c615736fe12c0d126a Author: Ondrej Zajicek <santi...@crfreenet.org> Date: Sat Jan 8 11:22:38 2011 +0100 Fixes interface names on BSD systems. diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 53b30ca..0e96f41 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -412,7 +412,6 @@ krt_read_ifinfo(struct ks_msg *msg) struct sockaddr_dl *dl = NULL; unsigned int i; struct iface *iface = NULL, f; - char *ifname = "(none)"; int fl = ifm->ifm_flags; for(i = 1; i!=0; i <<= 1) @@ -434,18 +433,17 @@ krt_read_ifinfo(struct ks_msg *msg) return; } - if(dl) ifname = dl->sdl_data; - iface = if_find_by_index(ifm->ifm_index); if(!iface) { /* New interface */ if(!dl) return; /* No interface name, ignoring */ - DBG("New interface \"%s\" found", ifname); + bzero(&f, sizeof(f)); f.index = ifm->ifm_index; - strncpy(f.name, ifname, sizeof(f.name) -1); + memcpy(f.name, dl->sdl_data, MIN(sizeof(f.name)-1, dl->sdl_nlen)); + DBG("New interface '%s' found", f.name); } else {
signature.asc
Description: Digital signature