[OLSR-users] ipv6 patches for olsr nameservice

John Hay (spam-protected)
Thu Dec 14 15:51:02 CET 2006


Hi Andreas,

> I've applied your patches. In cvs HEAD it had to be done pretty much
> manually due to the diff from the latest release. Could you please check
> out the current version and verify that it works?

I have done some light testing and it basically looks ok. I had to
make a small change to src/bsd/kernel_routes.c because rts has moved
into olsr_cnf.

When it came to installation I had a big surprise. It didn't install
where I thought it would and where previous versions did. Would you
mind changing make/Makefile.fbsd? On FreeBSD DESTDIR is used to point
to the root directory of where you want to install a whole distribution.
We use PREFIX to point the place where a software package should go. For
example /usr/local.

So here are my patches against olsrd-current.

--- /home/jhay/fbsd/olsr/olsrd-current/src/bsd/kernel_routes.c	Tue Dec 12 13:20:53 2006
+++ src/bsd/kernel_routes.c	Thu Dec 14 08:09:10 2006
@@ -253,7 +253,7 @@
 
   rtm->rtm_msglen = (unsigned short)(walker - buff);
 
-  len = write(rts, buff, rtm->rtm_msglen);
+  len = write(olsr_cnf->rts, buff, rtm->rtm_msglen);
 
   if (len < rtm->rtm_msglen)
     fprintf(stderr, "cannot write to routing socket: %s\n", strerror(errno));



--- /home/jhay/fbsd/olsr/olsrd-current/make/Makefile.fbsd	Sun Nov 12 23:54:53 2006
+++ make/Makefile.fbsd	Thu Dec 14 08:29:17 2006
@@ -2,12 +2,12 @@
 # FREEBSD SPECIFIC CONFIGURATION
 #
 
-DESTDIR ?= /usr/local
-SBINDIR = $(DESTDIR)/sbin
-ETCDIR = $(DESTDIR)/etc
-LIBDIR = $(DESTDIR)/lib
-DOCDIR = $(DESTDIR)/share/doc
-MANDIR = $(DESTDIR)/man
+PREFIX ?= /usr/local
+SBINDIR = $(PREFIX)/sbin
+ETCDIR = $(PREFIX)/etc
+LIBDIR = $(PREFIX)/lib
+DOCDIR = $(PREFIX)/share/doc
+MANDIR = $(PREFIX)/man
 
 SRCS +=		$(wildcard src/bsd/*.c) $(wildcard src/unix/*.c)
 HDRS +=		$(wildcard src/bsd/*.h) $(wildcard src/unix/*.h)
@@ -22,8 +22,8 @@
 
 ifdef LIBNET
 
-CFLAGS +=	-DSPOOF -I$(DESTDIR)/include
-LIBS +=		-L$(DESTDIR)/lib -lnet
+CFLAGS +=	-DSPOOF -I$(PREFIX)/include
+LIBS +=		-L$(PREFIX)/lib -lnet
 
 endif
 
John
-- 
John Hay -- (spam-protected) / (spam-protected)




More information about the Olsr-users mailing list