aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_pfroute
Commit message (Collapse)AuthorAgeFilesLines
* libhydra: Move all kernel plugins to libcharonTobias Brunner2016-03-035-2086/+0
|
* kernel-pfroute: Don't install virtual IPs if charon.install_virtual_ip is ↵Tobias Brunner2015-08-131-0/+17
| | | | disabled
* kernel-pfroute: If a new interface appears, slightly delay address enumerationMartin Willi2014-12-161-0/+9
| | | | | | | On OS X 10.10, when installing a virtual IP on a tun device, there is a chance that a RTM_IFANNOUNCE is sent before the IP is ready on that link when calling getifaddrs(). As we don't get an RTM_NEWADDR event either, that race lets us miss the virtual IP install event, failing the add_ip() call.
* kernel-pfroute: Check for RTM_IFANNOUNCE availabilityMartin Willi2014-10-141-0/+10
| | | | This message is not available on OS X.
* kernel-pfroute: Delete interfaces on RTM_IFANNOUNCE/IFAN_DEPARTURE eventsTobias Brunner2014-09-091-0/+38
| | | | | | | | | | | | We actually never deleted cached interfaces. So if the kernel reuses interface indices events for newly created interfaces could have been associated with interface objects of deactivated and deleted interfaces. Since we also didn't update the interface name when such an interface got reactivated we ended up using the old name e.g. to install routes. A trigger for this was the deletion and recreation of TUN devices during reauthentication of SAs that use virtual IPs.
* kernel-pfroute: Fix kernel response handlingTobias Brunner2014-08-191-2/+3
| | | | | | | | | | | | | The condvar is signaled for every handled message received from the kernel not only for replies (this changed with 2a2d7a4dc8). This may cause segfaults because this->reply is not set when the waiting thread is woken due to an IP address change. Since this->reply is only set when it is actually the expected reply (and only one request is sent at a time, thanks to c9a323c1d9) we only have to make sure the reply is there (and clear it once we handled it). Using separate condvars could also be an option in the future.
* kernel-interface: Add destination prefix to get_nexthop()Tobias Brunner2014-06-191-1/+1
| | | | | This allows to determine the next hop to reach a subnet, for instance, when installing routes for shunt policies.
* plugins: Don't link with -rdynamic on WindowsMartin Willi2014-06-041-1/+1
|
* kernel-pfroute: Let get_nexthop() default to destination addressTobias Brunner2014-03-311-3/+7
|
* libhydra: Use lib->ns instead of hydra->daemonTobias Brunner2014-02-121-2/+2
|
* kernel-pfroute: Don't cache route entries if installation failsTobias Brunner2014-02-121-2/+5
|
* kernel-pfroute: Fix mixed up memset() call in get_route()Mathias Krause2013-08-291-1/+1
| | | | | | | | | | The retry code introduced in dc8b083 got the memset() arguments wrong. Fix this to ensure the buffer gets zeroed, for real. It probably doesn't matter as we do reset the message length on retry, so the stale data shouldn't be seen by anyone. Found-by: git grep 'memset\s*\([^,]*,\s*[^,]*,\s*0\s*\)'
* kernel-netlink,pfroute: Properly update address flag within ROAM_DELAYTobias Brunner2013-08-121-1/+1
| | | | | | | 77d4a02 and 55da01f only updated the address flag when a job was created, which obviously had the same limitation as the old code. Fixes #374.
* kernel-pfroute: Implement roam event handling like in the kernel-netlink pluginTobias Brunner2013-08-121-13/+36
| | | | | There was no proper locking and the issue regarding the address flag also existed.
* kernel-pfroute: use watcher to receive kernel eventsMartin Willi2013-07-181-17/+13
|
* automake: replace INCLUDES by AM_CPPFLAGSMartin Willi2013-07-181-3/+5
| | | | | | INCLUDES are now deprecated and throw warnings when using automake 1.13. We now also differentiate AM_CPPFLAGS and AM_CFLAGS, where includes and defines are passed to AM_CPPFLAGS only.
* kernel-pfroute: Ignore IP address changes if address is %anyTobias Brunner2013-07-171-1/+2
|
* kernel-pfroute: Properly enumerate sockaddrs in interface messagesTobias Brunner2013-07-171-9/+26
| | | | | The ifa_msghdr and rt_msghdr structs are not compatible (at least not on FreeBSD).
* kernel-pfroute: Provide name of interfaces on which virtual IPs are installedTobias Brunner2013-07-171-0/+22
|
* kernel-pfroute: Ignore virtual IPs in address mapTobias Brunner2013-07-171-13/+9
| | | | | As the virtual flag is set after the address has been added to the map, we make sure we ignore virtual IPs when doing lookups.
* kernel-pfroute: Make sure source addresses are not virtual and usableTobias Brunner2013-07-171-4/+20
| | | | | | | It seems we sometimes get the virtual IP as source (with rightsubnet=0.0.0.0/0) even if the exclude route is already installed. Might be a timing issue because shortly afterwards the lookup seems to succeed.
* kernel-pfroute: Don't report an error when trying to reinstall a routeTobias Brunner2013-07-171-0/+4
|
* kernel-pfroute: Reinstall routes on interface/address changesTobias Brunner2013-07-171-7/+320
|
* kernel-pfroute: Trigger a roam event if a new interface appearsTobias Brunner2013-07-171-0/+4
|
* kernel-pfroute: Use ref_get() to allocate sequence numbersTobias Brunner2013-07-171-3/+3
|
* kernel-pfroute: Make time that is waited for VIPs to appear configurableTobias Brunner2013-07-171-2/+11
| | | | | One second might be too short for IPs to appear/disappear, especially on virtualized hosts.
* kernel-pfroute: Retry route lookup without source address on failureTobias Brunner2013-07-171-1/+16
| | | | | The known source address might be gone resulting in an error, making learning a new source address impossible.
* kernel-pfroute: Simplify route lookup after fixing sockaddr parsingTobias Brunner2013-06-211-90/+19
|
* kernel-pfroute: Alignment of sockaddrs is not always the sameTobias Brunner2013-06-211-1/+8
|
* kernel-pfroute: struct sockaddr arguments are 4 byte alignedTobias Brunner2013-06-211-4/+8
| | | | | | | | | This was noticed on Mac OS X where, if the default route is returned, RTA_NETMASK has sa_len set to 0, but skipping zero bytes to read the next address makes no sense, of course. Using 0 for sa_len seems a bit strange, in particular, because struct sockaddr has by definition a minimum length of 16 bytes. But it seems FreeBSD actually does the same.
* kernel-pfroute: Improve route lookup depending on information we get backTobias Brunner2013-06-211-12/+96
| | | | Kernels don't provide the same information for all routes.
* kernel-pfroute: Try to ensure we get a source address or interface nameTobias Brunner2013-06-211-0/+6
|
* kernel-pfroute: Use DST as nexthop for host routesTobias Brunner2013-06-211-0/+6
| | | | These are created as cache/clone on Mac OS X.
* kernel-pfroute: Implement get_source_addr()Tobias Brunner2013-06-211-12/+27
|
* kernel-pfroute: Properly install routes with interface and gatewayTobias Brunner2013-06-211-5/+6
|
* kernel-pfroute: Activate TUN device before setting addressTobias Brunner2013-06-211-1/+1
| | | | | On FreeBSD, for some reason, we don't learn the interface is up otherwise. Even though ifconfig lists it as up at the same time.
* kernel-pfroute: Raise tun event when creating/destroying TUN devices for ↵Tobias Brunner2013-06-211-1/+6
| | | | virtual IPs
* kernel-pfroute: allow only one thread to do a route look up simultaneouslyMartin Willi2013-05-061-1/+8
| | | | Otherwise we mess up the sequence number another thread is waiting for.
* kernel-pfroute: add a feature flag requesting "exclude" routesMartin Willi2013-05-061-0/+7
| | | | | | | | If routes installed along with policies covering the peer address affect local IKE/ESP packets, they won't get routed correctly. To work around this issue, the kernel interface can install "exclude" routes for the IKE peer. Not all networking backends require this workaround, hence we export a flag for it if it is required.
* kernel-pfroute: remove unused interface address refcountingMartin Willi2013-05-061-11/+0
|
* kernel-pfroute: mark IPs installed on tun device as virtualMartin Willi2013-05-061-1/+24
|
* kernel-pfroute: install virtual IPs using dedicated tun devicesMartin Willi2013-05-061-5/+91
|
* kernel-interface: support enumeration of virtual-only IPsMartin Willi2013-05-061-0/+4
|
* kernel-pfroute: split /0 routes to avoid conflict with default routeMartin Willi2013-05-061-0/+15
|
* kernel-pfroute: rescan address list for an interface if its state changesMartin Willi2013-05-061-0/+43
| | | | | It seems that we don't get address notifications if the interface is down on OS X.
* kernel-pfroute: add newly appearing interfaces to the interface cacheMartin Willi2013-05-061-1/+22
|
* kernel-pfroute: implement get_nexthop()Martin Willi2013-05-061-6/+73
|
* kernel-pfroute: install and uninstall routesMartin Willi2013-05-061-2/+129
|
* kernel-pfroute: collect replies received for our own queriesMartin Willi2013-05-061-4/+40
|
* kernel-pfroute: refactor PF_ROUTE message processing, use an enumeratorMartin Willi2013-05-061-35/+117
|