[Olsr-users] olsrd-0.6.4 host emulation mode reg.

Vigneswaran R (spam-protected)
Thu Feb 7 09:40:24 CET 2013


Hello,

When I ran olsrd (0.6.4) in host emulation mode as mentioned in 
<http://www.olsr.org/docs/README-Olsr-Switch.html>, I got the following 
error.

     sendto(v4): Socket operation on non-socket

I created a small patch to resolve this problem, as shown below. However 
I am not very sure whether it has any side effects. Any inputs are 
welcome. Thank you.

Regards,
Vignesh

olsrd_0.6.4_hemu_sock_err.patch
-------------------------------

diff -aur olsrd-0.6.4/src/unix/ifnet.c olsrd-0.6.4-patched/src/unix/ifnet.c
--- olsrd-0.6.4/src/unix/ifnet.c	2012-10-31 00:29:44.000000000 +0530
+++ olsrd-0.6.4-patched/src/unix/ifnet.c	2013-02-07 11:17:22.000000000 +0530
@@ -452,7 +452,7 @@
       *on what interface the message is transmitted
       */

-    ifp->olsr_socket = gethemusocket(&sin);
+    ifp->send_socket = ifp->olsr_socket = gethemusocket(&sin);

      if (ifp->olsr_socket < 0) {
        fprintf(stderr, "Could not initialize socket... exiting!\n\n");

-------------- next part --------------
A non-text attachment was scrubbed...
Name: olsrd_0.6.4_hemu_sock_err.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-users/attachments/20130207/2bb402cc/attachment.bin>


More information about the Olsr-users mailing list