[Olsr-dev] Dynamic adding of interfaces

Markus Kittenberger (spam-protected)
Thu Apr 12 23:04:07 CEST 2012

On Thu, Apr 12, 2012 at 7:31 PM, Mitar <(spam-protected)> wrote:

> Hi!
> On Thu, Apr 12, 2012 at 12:33 PM, Markus Kittenberger
> <(spam-protected)> wrote:
> >> There is no way to specify for example "tap+" like any interface which
> >> starts with "tap"?
> >
> > nice idea,..
> How hard it would be to implement this?

i guess currently olsrd has just its static interface list,.. (consisting
of all interfaces mentioned in olsrd.conf, and some of them are active used
by olsrd, others not (as they are e.g. down), and others do not even exist)

this would need to change to 2 seperate lists, one of the currently active
olsrd interfaces (with all their settings), and one wich derfines how to
identify olsrd itnerfaces, and which config they need

and still this approach is not as flexible as dynamic reconfiguration of

> >> By interface name or interface ID?
> >
> > afair it just subscribes to all interface (=RTMGRP_LINK) events
> And then just filters out itself the one it does not want?

yes, but ...

> So it sould
> be easy to implement a "black list" of interfaces instead of "white
> list" as it is currently done?
hmm yes we have white lists, but not sure if blacklisting is the right

i think some wildcard whitelist rules are safer. (or even both together)

also you can not specify interface specific options with a blacklist only

> > don't think so. (a listener can just select which multicast groups it
> wants
> > to join, e.g. RTMGRP_LINK or ROUTE or NEIGH or IFADDR ...)
> > but filtering the events in olsrd after receive is not that hard.
> And there are not many events?

depends, if you have thousands of interfaces, which change states fast, ...
netlink gets quite chatty,..

and this is when problems start, netlink is not an reliable protocol, i.e.
if it sends many mesages, and your apps receiving buffer overflows, you
have netlink "packetloss".

another reason why olsrd still (and likely forever) needs to do some
interface polling,..
(but it could do this via netlink too, instead of sysctl)

So those events are just when
> interfaces appear and disappear?

yep, (but there are more than just 2 states (to exist, or not to exist) an
interface can have,..)

also olsrd needs as least information of RTMGRP_IFADDR, especially if the
interface source and broadcast adress are not specified in the olsrd.conf

> Sending and receiving of packets is
netlink has nothing to do with actual "traffic"..

done by normally binding on interfaces


> once olsrd is informed about
> them?
after this, and checking if the interface is/seems "useable".

lg Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120412/a7fbfa74/attachment.html>

More information about the Olsr-dev mailing list