[olsr-dev] Small bugfix for IPIP-Tunnels
Sven-Ola Tuecke
(spam-protected)
Mon Mar 7 19:58:38 CET 2005
Hi Andreas or Thomas,
please add the following bugfix. Just checked this with an ipip tunnel: it
works (ping and ssh tested). I added a manual Ip4Broadcast to olsrd.conf and
this patch. Bingo...
Heres the fix, otherwise olsrd complains about not having broadcasts:
--- src/unix/ifnet.c~ Mon Mar 7 19:45:51 2005
+++ src/unix/ifnet.c Mon Mar 7 19:46:05 2005
@@ -186,7 +186,7 @@
/* Check broadcast */
if ((olsr_cnf->ip_version == AF_INET) &&
- (iface->cnf->ipv4_broadcast.v4) && /* Skip if fixed bcast */
+ !(iface->cnf->ipv4_broadcast.v4) && /* Skip if fixed bcast */
(!(ifp->int_flags & IFF_BROADCAST)))
{
OLSR_PRINTF(3, "\tNo broadcast - removing\n")
@@ -534,7 +534,7 @@
/* Check broadcast */
if ((olsr_cnf->ip_version == AF_INET) &&
- (iface->cnf->ipv4_broadcast.v4) && /* Skip if fixed bcast */
+ !(iface->cnf->ipv4_broadcast.v4) && /* Skip if fixed bcast */
(!(ifs.int_flags & IFF_BROADCAST)))
{
OLSR_PRINTF(debuglvl, "\tNo broadcast - skipping\n")
For those who are interested, here is a simple example setup.
modprobe ipip
ip tunnel add tun0 mode ipip remote \
212.111.222.333 local 212.91.92.93 ttl 32
#ip tunnel add tun0 mode ipip remote \
# 212.91.92.93 local 212.111.222.333 ttl 32
ifconfig tun0 104.65.65.105 netmask 255.255.255.252
#ifconfig tun0 104.65.65.106 netmask 255.255.255.252
Add to /etc/olsrd.conf:
Interface "tun0"
{
Ip4Broadcast 104.65.65.107
}
Regards,
Sven-Ola
More information about the Olsr-dev
mailing list