[Olsr-cvs] olsrd-current/src/unix ifnet.c,1.33,1.34
Andreas T�nnesen
(spam-protected)
Sun Jan 8 21:27:20 CET 2006
Update of /cvsroot/olsrd/olsrd-current/src/unix
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7804/unix
Modified Files:
ifnet.c
Log Message:
Added libnet IPv6 support. For some strange reason libnet_write failes on my debian box using libnet 1.1 with a free() failure detected by glibc. I cant see why, but Ill investigate further later on
Index: ifnet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/unix/ifnet.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** ifnet.c 7 Jan 2006 08:16:24 -0000 1.33
--- ifnet.c 8 Jan 2006 20:27:18 -0000 1.34
***************
*** 930,946 ****
}
- #ifdef USE_LIBNET
- ifp->libnet_ctx = libnet_init(LIBNET_RAW4, ifp->int_name, get_libnet_errbuf());
-
- if(ifp->libnet_ctx == NULL)
- {
- fprintf(stderr, "Could not initialize libnet... exiting!\n\n");
- olsr_syslog(OLSR_LOG_ERR, "Could not initialize libnet... exiting!\n\n");
- olsr_cnf->exit_value = EXIT_FAILURE;
- kill(getpid(), SIGINT);
- }
- #else
- ifp->libnet_ctx = NULL;
- #endif
}
else
--- 930,933 ----
***************
*** 969,972 ****
--- 956,975 ----
}
+
+ #ifdef USE_LIBNET
+ ifp->libnet_ctx = libnet_init((olsr_cnf->ip_version == AF_INET) ?
+ LIBNET_RAW4 : LIBNET_RAW6,
+ ifp->int_name, get_libnet_errbuf());
+
+ if(ifp->libnet_ctx == NULL)
+ {
+ fprintf(stderr, "Could not initialize libnet... exiting!\n\n");
+ olsr_syslog(OLSR_LOG_ERR, "Could not initialize libnet... exiting!\n\n");
+ olsr_cnf->exit_value = EXIT_FAILURE;
+ kill(getpid(), SIGINT);
+ }
+ #else
+ ifp->libnet_ctx = NULL;
+ #endif
/* Register socket */
More information about the Olsr-cvs
mailing list