aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_iface.c
Commit message (Collapse)AuthorAgeFilesLines
* pingu_adm: implement host-status and gateway-statusNatanael Copa2011-10-121-0/+15
|
* pingu_iface: support binding multiple ping hosts to same ifaceNatanael Copa2011-10-071-1/+35
| | | | | | | Add config option for executing actions when interface gateway goes up/down. Add config option for required hosts up per interface (defaults to 1)
* pingu: rename pingu_gateway to pingu_routeNatanael Copa2011-10-071-10/+10
|
* pingu_iface: only load-balance if 2 or more interfaces are configured for itNatanael Copa2011-09-211-14/+16
| | | | | We should not try load-balance at all if there are only 1 or less interfaces configured with "load-balance"
* pingu_netlink: delete multipath route if there are no pathsNatanael Copa2011-09-091-2/+2
| | | | | | The normal action is to replace but if all ISPs goes down we need to explicit delete the multipath route. Otherwise we will have the last default gw hanging around.
* pingu_iface: only update default route in main route tableNatanael Copa2011-09-091-1/+2
| | | | | This is related the d3c9eca81e94978284e619aca58cee93977f30a7 fix where we save all the routes in list, not only default gateways.
* pingu_iface: only update multpath route when route is a default gwNatanael Copa2011-09-081-3/+4
| | | | | We now save all routes in list but we don't need update multipath routes unless the changed route is a default gateway.
* pingu_iface: cleanup load-balance route on exitNatanael Copa2011-09-071-2/+19
|
* pingu_{iface,netlink}: only remove route rules that we actually createdNatanael Copa2011-09-071-1/+2
|
* pingu_iface: bind to interface tooNatanael Copa2011-09-061-0/+5
| | | | This is so we only see the pings for that interface
* pingu: cleanup on exitNatanael Copa2011-09-061-0/+9
| | | | We remove the ip rule, close the ping sockets and netlink sockets.
* pingu: only create/lose binding when we get/lose addressNatanael Copa2011-09-061-1/+4
| | | | | We don't need to rebind every burst. We only bind when we get an address and we only lose the binding when the address is lost.
* pingu_iface: bind to address instead of oifNatanael Copa2011-09-061-2/+2
| | | | | Seems like ip rule does not work with source address unless we bind to address
* pingu_iface: fix for previous commitNatanael Copa2011-08-161-1/+1
|
* pingu: implement load balancing with nexthopsNatanael Copa2011-08-151-0/+2
| | | | We do loadbalancing by creating a new default gw with nexthops
* pingu_gateway: cleanup. split out gateway funcsNatanael Copa2011-08-051-105/+10
| | | | | To make code cleaner we move all gateway functions to separate file and rename a few functions.
* pingu: implement new config formatNatanael Copa2011-08-051-18/+32
| | | | | | | | | | | | | | | | | | | | | New format allows users to define interfaces and ping hosts separately. This means we can run pingu in routing-only mode to set up and manage route tables for multi-isp. We allow the user config a preferred alternate route table for each interface. If not configured, pingu will pick one. Example interface definition looks like: interface eth0 { route-table 10 } Example host definition looks like: host 192.168.0.1 { bind-interface eth0 }
* pingu_iface: init the sockets when init instead of when createNatanael Copa2011-08-021-6/+8
|
* pingu: use source address for ip rule and copy scope link routeNatanael Copa2011-08-021-4/+8
|
* pingu: remove default gw from main route table when isp goes downNatanael Copa2011-07-291-0/+9
|
* pingu: delete gateway from our listNatanael Copa2011-07-281-0/+49
|
* pingu: clean up for ipv6 support in futureNatanael Copa2011-07-281-16/+27
| | | | | | | make the pingu_gateway struct also hold a destination so the struct can be reused. use sockaddr_any as much as possible.
* pingu: add gw to list and minor cleanupNatanael Copa2011-07-281-13/+29
| | | | | | | | - add default gateways to our gw list - use sockaddr_init to init our gw - implement sockaddr_to_string TODO: delete default gateways from list
* pingu: use sockaddr_anyNatanael Copa2011-07-281-8/+49
| | | | add common sockaddr utility functions
* Use sockaddr_any for storing address and gatewayNatanael Copa2011-07-281-1/+1
|
* pingu: add initial code to modify routing tablesNatanael Copa2011-07-211-2/+7
| | | | | For now we just create the alternate routing tables from table 10 and +1 for each new interface. First interface is 10, second is 11 etc.
* pingu_netlink: pick up primary address for interfacesNatanael Copa2011-07-151-2/+31
|
* pingu_netlink: monitor link status of interfaces via netlinkNatanael Copa2011-07-131-2/+1
|
* pingu_iface: implement pingu_iface_usable()Natanael Copa2011-07-131-0/+7
| | | | To test if we can use socket.
* pingu: try bind socket to interface every burstNatanael Copa2011-07-131-11/+15
| | | | | | It might be an interface that disappeared and came back, e.g ppp0. We also don't even try unless we have a successful binding.
* pingu_iface: fix bugNatanael Copa2011-07-131-1/+1
|
* iface: add initial implementationNatanael Copa2011-07-071-0/+104