[strongSwan] Crash when eth goes down and vpn connection is still established

richter at ecos.de richter at ecos.de
Fri Nov 9 10:35:13 CET 2012


Hi,

when I disconnect the eth interface while an ipsec connection is establish charon crashs.

I get an endless recursion in function get_route. It seems that the eth interface is already down, but the default gateway is still there (at least route->gtw contains the ip addr of the default gateway, how it was before the eth was disconnected).

Any idea how to fix this?

Gerald

(gdb) bt
#0  0x50482f98 in netlink_send (this=0x0, in=0x0, out=0x0, out_len=0x0) at kernel_netlink_shared.c:67
#1  0x504807b8 in get_route (this=0x22e41948, dest=0x230017d0, nexthop=false, candidate=0x22e76c70) at kernel_netlink_net.c:1439
#2  0x50480d60 in get_route (this=0x22e41948, dest=0x23001498, nexthop=false, candidate=0x22e76c70) at kernel_netlink_net.c:1570
#3  0x50480d60 in get_route (this=0x22e41948, dest=0x23001160, nexthop=false, candidate=0x22e76c70) at kernel_netlink_net.c:1570
....


#2  0x50480d60 in get_route (this=0x22e41948, dest=0x23001498, nexthop=false, candidate=0x22e76c70) at kernel_netlink_net.c:1570
1570                            route->src_host = get_route(this, gtw, FALSE, candidate);
(gdb) l
1565                    if (route->gtw.ptr)
1566                    {       /* no src, no iface, but a gateway - lookup src to reach gtw */
1567                            host_t *gtw;
1568
1569                            gtw = host_create_from_chunk(msg->rtm_family, route->gtw, 0);
1570>>                          route->src_host = get_route(this, gtw, FALSE, candidate);
1571                            gtw->destroy(gtw);
1572                            if (route->src_host)
1573                            {       /* more of the same */
1574                                    if (!candidate ||
(gdb) p *route
$2 = {gtw = {ptr = 0x230015b4 "\n\016\v\002\b", len = 4}, src = {ptr = 0x0, len = 0}, dst = {ptr = 0x0, len = 0}, src_host = 0x0, dst_len = 0 '\000', table = 254, oif = 6}
(gdb)





More information about the Users mailing list