On Wed, May 29, 2013 at 08:36:50AM -0700, Mihail Costea wrote:
> On 26 May 2013 07:02, Antonio Quartulli <[email protected]> wrote:
> > On Fri, May 17, 2013 at 03:27:51PM +0300, Mihail wrote:
> >> From: "[email protected]" <[email protected]>
> >>
> >> Added functions needed for NDP snooping, like getting the IPv6 addresses
> >> or getting the target HW address from an Neighbor Advertisement (NA).
> >> Also added functions to create NA for Neighbor
> >> Solicitations that have already the HW address in DAT.
> >>
> >> Problems: I have to generate router and override flags for NA. For now
> >> I don't now exactly how to get them. From what I've seen, batman could
> >> now which nodes are routers, but for override flag, we should find a
> >> mechanism to know if the node is proxy or has anycast address.
> >> For inspiration I have used the code at: <net/ipv6/ndisc.c>.
> >
> > What is the concept you have in mind?
> > Maybe you first explain a bit more about your idea so that we can help you 
> > in
> > find a way to implement that.
> >
> > You want to edit the router address and flags carried by the NA?
> >
> 
> When creating the NA response for an HW address already contained in
> the DAT, I must set 3 flags: router, solicited and override.
> 
> The solicited flag is 1 because I only answer to solicited NS.
> 
> The router flag should be 1 only if the device for which we have the
> HW address is a router. From what I've seen there are some functions
> in batatv for finding routers, but I'll have to see if they can be
> used on the nodes connected to mesh-nodes. Or maybe there is another
> way to see if the device is a router.

I guess here you are looking for an IPv6 router, right? so a node which
advertised itself as it, correct? In this case in batman-adv there is nothing
which can help you because there is no IPv6 detection of any type..
How can we recognise if a node is advertising itself as router? maybe by
snooping other NDP messages?

> 
> About the override flag, I don't really have an idea. I didn't
> understand very well how it was calculated in net/ipv6/ndisc.c so I
> set it to 1 by default (it should be 0 for proxy and anycast address).
> 

mh..ok. We may want to better check this once more to avoid triggering any
strange behaviour in the network :)

Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

Attachment: signature.asc
Description: Digital signature

Reply via email to