Vigneswaran R
2013-02-07 08:40:24 UTC
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");
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");