Hi Jan,
recently we discovered that RTnet's routing capability was broken. There is
a patch attached to correct the problem.
Sebastian
From: Sebastian Smolorz <[email protected]>
Date: Mon, 19 Apr 2010 15:55:55 +0200
Subject: [PATCH] RTIPv4 Router: Fix configure and build
A bug in the configure script prevented the routing capability from being
activated even if it was selected. That caused another bug to stay
undiscovered: The function rt_ip_route_output() was called only with two
instead of three arguments in rt_ip_route_forward().
Signed-off-by: Sebastian Smolorz <[email protected]>
---
configure | 2 +-
configure.ac | 2 +-
stack/ipv4/route.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 36c197e..aed96eb 100755
--- a/configure
+++ b/configure
@@ -13227,7 +13227,7 @@ fi
{ $as_echo "$as_me:$LINENO: result: ${CONFIG_RTNET_RTIPV4_ROUTER:-n}" >&5
$as_echo "${CONFIG_RTNET_RTIPV4_ROUTER:-n}" >&6; }
-if test "CONFIG_RTNET_RTIPV4_ROUTER" = "y"; then
+if test "$CONFIG_RTNET_RTIPV4_ROUTER" = "y"; then
cat >>confdefs.h <<\_ACEOF
#define CONFIG_RTNET_RTIPV4_ROUTER 1
diff --git a/configure.ac b/configure.ac
index 943b280..a4d3bcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1178,7 +1178,7 @@ AC_ARG_ENABLE(router,
*) CONFIG_RTNET_RTIPV4_ROUTER=n ;;
esac])
AC_MSG_RESULT([${CONFIG_RTNET_RTIPV4_ROUTER:-n}])
-if test "CONFIG_RTNET_RTIPV4_ROUTER" = "y"; then
+if test "$CONFIG_RTNET_RTIPV4_ROUTER" = "y"; then
AC_DEFINE(CONFIG_RTNET_RTIPV4_ROUTER, 1, [Router])
fi
diff --git a/stack/ipv4/route.c b/stack/ipv4/route.c
index abc25fb..2151686 100644
--- a/stack/ipv4/route.c
+++ b/stack/ipv4/route.c
@@ -825,7 +825,7 @@ int rt_ip_route_forward(struct rtskb *rtskb, u32 daddr)
goto error;
}
- if (rt_ip_route_output(&dest, daddr) < 0) {
+ if (rt_ip_route_output(&dest, daddr, INADDR_ANY) < 0) {
/*ERRMSG*/rtdm_printk("RTnet: unable to forward packet from %u.%u.%u.%u\n",
NIPQUAD(rtskb->nh.iph->saddr));
goto error;
--
1.5.2.4
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers