Small gotcha in 1.1.beta16

From: Doug Urner <dlu@dont-contact.us>
Date: Mon, 11 Nov 1996 16:30:04 -0800

If you don't have any friends you get a segmentation violation :-(

The problem seems to be that neighbors_open() is called without
neighbors_init() having ever been called if you don't have cache_host
entries in your config file. The patch below seems to work, but I'm
not sure if it is "right."

*** neighbors.c.orig Mon Nov 11 16:29:23 1996
--- neighbors.c Mon Nov 11 16:18:47 1996
***************
*** 325,330 ****
--- 325,332 ----
      edge **E = NULL;
      struct servent *sep = NULL;
  
+ if (friends == NULL)
+ neighbors_init();
      memset(&name, '\0', sizeof(struct sockaddr_in));
      if (getsockname(fd, (struct sockaddr *) &name, &len) < 0)
        debug(15, 1, "getsockname(%d,%p,%p) failed.\n", fd, &name, &len);

Doug

--
Douglas L. Urner, dlu@bsdi.com, +1.503.231.4881
Received on Mon Nov 11 1996 - 16:30:14 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:31 MST