[Olsr-dev] MainIp and SrcIpRoutes do not work

Markus Kittenberger (spam-protected)
Wed Sep 1 06:27:15 CEST 2010


On Tue, Aug 31, 2010 at 11:11 PM, Jernej Kos <(spam-protected)>wrote:

> Hello!
>
> On 08/31/2010 09:53 PM, Markus Kittenberger wrote:
> > the srcip should be defineable per interface (in the config file) using
> the
> > IPv4Src parameter
>
> As far as I see it the olsr_cnf->unicast_src_ip option is global and is
> not per-interface configurable?

yes it is, i looked at ip4srcip which is used as src ip for olsrd messages,
..

(and once there was an idea to use this as optional source for the
unicast_src_ip sa well, but usually nobody needs interface specific
unicast_src_ips)

> And this is what the netlink code [1]
> uses to set the source tag for its routes.
>
> Also if you look at the code that configures the main IP address when
> the MainIp option is not used, it sets up the unicast_src_ip correctly
> (from the first interface defined, same as main_addr). But when MainIp
> is used, unicast_src_ip is never defined.
>
> So either unicast_src_ip should be set in oparse.y when processing the
> MainIp directive or the netlink code should be modified to use main_addr
> instead of unicast_src_ip and the latter removed as it is not used
> anywhere else as far as I can see.
>
true this config var is not really needed (as it will probably have always
same content as main_addr), but as i don`t have the time to think over it at
the moment, ...

i made a trivial patch, that should set the unicast_src_ip when an main-ip
is used,.. (and ipv4 is used)

Markus


> [1] - src/linux/kernel_routes_nl.c, line 527
>
> Best regards.
> --
> Jernej Kos <(spam-protected)>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20100901/d652e3d7/attachment.html>


More information about the Olsr-dev mailing list