[strongSwan] kernel_netlink_net.c get_route recursion

Sial Nije sialnije at gmail.com
Fri Mar 21 18:47:12 CET 2014


In 5.1.1 get_route() in kernel_netlink_net.c has a 'recursion' parameter to
terminate self-recursion when the count is greater than 2.
I am using 4.4.1 which does not have this parameter and ran into a
situation that once in a while get_source_addr() calls
this, latches on the gateway address of a static route, and loops forever
on that gateway address until it blows the stack.

The recursion count trick should work in our case but we have a second
problem. Some of the route table entries created by charon at the bottom of
kernel_netlink_ipsec.c add_policy() point at the wrong peer address. I am
wondering if the two
problems are related.

Can anyone shed some light on what could cause these 2 problems?

I have no idea how the netlink interface work. Notice that  get_route does
1. this->socket->send()
2. lock mutex
3. for loop to process msg
4. unlock mutex

Is it possible that after step 1 send():
- another thread sends a different msg,
- eats up the response intended for the current thread,
- and leave behind the wrong response for the current thread to pick up?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/users/attachments/20140321/ddb7c333/attachment.html>

More information about the Users mailing list