aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
Commit message (Collapse)AuthorAgeFilesLines
* kernel-netlink: Set usable state whenever an interface appearsTobias Brunner2017-08-231-2/+2
| | | | | | | | If an interface is renamed we already have an entry (based on the ifindex) allocated but previously only set the usable state once based on the original name. Fixes #2403.
* linked-list: Change return value of find_first() and signature of its callbackTobias Brunner2017-05-261-25/+26
| | | | This avoids the unportable five pointer hack.
* linked-list: Change interface of callback for invoke_function()Tobias Brunner2017-05-261-3/+7
| | | | This avoids the unportable five pointer hack.
* Change interface for enumerator_create_filter() callbackTobias Brunner2017-05-261-44/+53
| | | | | This avoids the unportable 5 pointer hack, but requires enumerating in the callback.
* Migrate all enumerators to venumerate() interface changeTobias Brunner2017-05-261-2/+9
|
* kernel-netlink: Use RTA_SRC to specify route source in kernel-based lookupsMartin Willi2017-02-131-1/+8
| | | | | | | For table dumps the kernel accepts RTA_PREFSRC to filter the routes, which is what we do when doing userspace route calculations. For kernel-based route lookups, however, the RTA_PREFSRC attribute is ignored and we must specify RTA_SRC for policy based route lookups.
* kernel-netlink: Use kernel-based route lookup if we do not install routesMartin Willi2017-02-131-1/+11
| | | | | | | | | | | | For gateways with many connections, installing routes is often disabled, as we can use a static route configuration to achieve proper routing with a single rule. If this is the case, there is no need to dump all routes and do userspace route lookups, as there is no need to exclude routes we installed ourself. Doing kernel-based route lookups is not only faster with may routes, but also can use the full power of Linux policy based routing; something we can hardly rebuild in userspace when calculating routes.
* kernel-netlink: Return interface name in local subnet enumeratorTobias Brunner2017-02-081-5/+15
|
* kernel-interface: Add interface name to local subnet enumeratorTobias Brunner2017-02-081-1/+2
|
* kernel-netlink: Implement enumerator for local subnetsTobias Brunner2017-02-081-0/+130
|
* kernel-netlink: Set NODAD flag for virtual IPv6 addressesTobias Brunner2017-02-061-10/+16
| | | | | | | The Optimistic Duplicate Address Detection (DAD) seems to fail in some cases (`dadfailed` in `ip addr`) rendering the virtual IP address unusable. Fixes #2183.
* kernel-netlink: Prefer matching label when selecting IPv6 source addressesTobias Brunner2017-02-061-3/+78
| | | | | | | | This implements rule 6 of RFC 6724 using the default priority table, so that e.g. global addresses are preferred over ULAs (which also have global scope) when the destination is a global address. Fixes #2138.
* kernel-netlink: Fix get_route() interface determinationChristophe Gouault2016-10-121-2/+2
| | | | | | | | | | | | A wrong variable is used (route instead of best), so much that the returned interface belongs to the last seen route instead of the best choice route. get_route() may therefore return mismatching interface and gateway. Fixes: 66e9165bc686 ("kernel-netlink: Return outbound interface in get_nexthop()") Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
* kernel-netlink: Consider RTA_SRC when looking for a source addressTobias Brunner2016-10-051-52/+134
|
* kernel-netlink: Return outbound interface in get_nexthop()Tobias Brunner2016-06-101-5/+43
|
* kernel-net: Let get_nexthop() return an optional interface nameTobias Brunner2016-06-101-5/+10
| | | | | The returned name should be the interface over which the destination address/net is reachable.
* kernel-netlink: Provide error information for Netlink socketsTobias Brunner2016-06-101-3/+6
| | | | #1467.
* kernel-netlink: Order routes by prefix before comparing priority/metricTobias Brunner2016-05-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Metrics are basically defined to order routes with equal prefix, so ordering routes by metric first makes not much sense as that could prefer totally unspecific routes over very specific ones. For instance, the previous code did break installation of routes for passthrough policies with two routes like these in the main routing table: default via 192.168.2.1 dev eth0 proto static 192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.10 metric 1 Because the default route has no metric set (0) it was used, instead of the more specific other one, to determine src and next hop when installing a route for a passthrough policy for 192.168.2.0/24. Therefore, the installed route in table 220 did then incorrectly redirect all local traffic to "next hop" 192.168.2.1. The same issue occurred when determining the source address while installing trap policies. Fixes 6b57790270fb ("kernel-netlink: Respect kernel routing priorities for IKE routes"). Fixes #1416.
* Use standard unsigned integer typesAndreas Steffen2016-03-241-23/+23
|
* kernel-netlink: Fix lookup of next hops for destinations with prefixTobias Brunner2016-03-211-1/+2
| | | | References #1347.
* libhydra: Move kernel interface to libcharonTobias Brunner2016-03-031-4/+4
| | | | This moves hydra->kernel_interface to charon->kernel.
* libhydra: Move all kernel plugins to libcharonTobias Brunner2016-03-031-0/+2685
|
* Moved all kernel plugins to libhydra.Tobias Brunner2010-09-021-1519/+0
|
* Refer to kernel interface via hydra and not charon.Tobias Brunner2010-09-021-1/+1
|
* Moved roam job creation to kernel event handler.Tobias Brunner2010-09-021-11/+23
|
* Refer to scheduler via hydra and not charon.Tobias Brunner2010-09-021-1/+1
|
* Some whitespace and code style fixes.Tobias Brunner2010-09-021-1/+1
|
* Refer to processor via hydra and not charon.Tobias Brunner2010-09-021-1/+2
|
* Moving charon to libcharon.Tobias Brunner2010-03-191-0/+1506