Hi Peter,
Welcom to the kbfd-devel ML!
I'm waiting for you.
At Sun, 8 Jun 2008 21:19:23 +0200,
Peter Szilagyi wrote:
>I have a question regarding the recently implemented BFD interval
>command (BFD_SETLINK).
>
>In order to change BFD timer intervals, one has to fill in a
>bfd_nl_linkinfo structure, and send it through the netlink socket to
>kbfd. How can I obtain the correct value for the ifindex field of this
>structure from userspace, if I have just set up a new session with a
>peer? All I know is the source and destination interface addresses
>involved in this BFD session.
I guess that you are talking about using bfd from BGP.
#ospfd/ospf6d can recognize ifindex when they create the new
session.
Ah, this might be a bug.
If the session was created, and userspace didn't specify
ifindex of this session, kbfd would try to get the ifindex
value from the destination address of this session.
Like below, (from bfd_session_new() in kbfd_session.c:)
if (ifindex == 0)
ifindex = bfd->proto->get_oif(dst);
But if there is no route information to the destination at
this time, kbfd cannot get this ifindex value. After that,
"show bfd neighbors" command would show "unknown" interface.
This should be fixed with retrying to set the value of
ifindex when session's state would change to "BSM_Up".
And when the session of bfd has just created, and the route
to the destination isn't prepared, we cannot see which
interface would be used by this session.
Actually kbfd support only 1-hop neighbor, so this should be
done by operator at now.....
#Did you mean that?
I hope this is your question......
regards,
hajime
|