| 1509 | | switch (charon->kernel_interface->add_route(charon->kernel_interface, |
|---|
| 1510 | | route->dst_net, route->prefixlen, route->gateway, |
|---|
| 1511 | | route->src_ip, route->if_name)) |
|---|
| | 1509 | if (route->if_name) |
|---|
| | 1510 | { |
|---|
| | 1511 | switch (charon->kernel_interface->add_route( |
|---|
| | 1512 | charon->kernel_interface, route->dst_net, |
|---|
| | 1513 | route->prefixlen, route->gateway, |
|---|
| | 1514 | route->src_ip, route->if_name)) |
|---|
| | 1515 | { |
|---|
| | 1516 | default: |
|---|
| | 1517 | DBG1(DBG_KNL, "unable to install source route for %H", |
|---|
| | 1518 | route->src_ip); |
|---|
| | 1519 | /* FALL */ |
|---|
| | 1520 | case ALREADY_DONE: |
|---|
| | 1521 | /* route exists, do not uninstall */ |
|---|
| | 1522 | route_entry_destroy(route); |
|---|
| | 1523 | break; |
|---|
| | 1524 | case SUCCESS: |
|---|
| | 1525 | /* cache the installed route */ |
|---|
| | 1526 | policy->route = route; |
|---|
| | 1527 | break; |
|---|
| | 1528 | } |
|---|
| | 1529 | } |
|---|
| | 1530 | else |
|---|