aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* pingu_netlink: remove ip rule before we reset the addressNatanael Copa2011-09-081-1/+1
| | | | We use the address when removing the ip rule.
* 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_netlink: save all routes for cleaup laterNatanael Copa2011-09-081-28/+15
| | | | | Instead of only saving the default gateways we save all routes and use those when we clean up on exit.
* pingu_gateway: implement pingu_gateway_first_default()Natanael Copa2011-09-082-1/+10
| | | | Finds first default gateway in list.
* pingu_netlink: flush route tables on exitNatanael Copa2011-09-071-0/+26
|
* 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-074-4/+15
|
* pingu_netlink: get errorcodes from route changesNatanael Copa2011-09-071-37/+83
| | | | | We use netlink_talk() to get back the error code. This helps us to giver more accurate error messages in logs.
* pingu_burst: try rebind every burstNatanael Copa2011-09-061-0/+7
| | | | In case the bind failed on the got-address event.
* 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-065-1/+29
| | | | We remove the ip rule, close the ping sockets and netlink sockets.
* pingu: catch SIGINT so we can cleanup at exitNatanael Copa2011-09-061-0/+10
|
* pingu: only create/lose binding when we get/lose addressNatanael Copa2011-09-064-10/+7
| | | | | 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-063-2/+17
| | | | | Seems like ip rule does not work with source address unless we bind to address
* pingu_netlink: fix logging of routesNatanael Copa2011-09-061-3/+5
| | | | Sometimes we have via a gateway and sometimes we don't.
* pingu_netlink: create nexthop route even if its aloneNatanael Copa2011-08-181-3/+1
| | | | | Otherwise it will not adjust the default route if one of the ISPs goes down.
* pingu: add config option 'load-balance'Natanael Copa2011-08-163-4/+25
| | | | | Add a config option to tell pingu that we want the interface to be load balanced. We also have an optional value to tell the weight.
* pingu_iface: fix for previous commitNatanael Copa2011-08-161-1/+1
|
* pingu: implement load balancing with nexthopsNatanael Copa2011-08-153-15/+137
| | | | We do loadbalancing by creating a new default gw with nexthops
* pingu_gateway: move is_default_gwNatanael Copa2011-08-153-17/+19
| | | | It belongs in pingu_gateway
* pingu_netlink: log error responsesNatanael Copa2011-08-151-0/+13
|
* pingu_gateway: cleanup. split out gateway funcsNatanael Copa2011-08-055-119/+145
| | | | | To make code cleaner we move all gateway functions to separate file and rename a few functions.
* pingu_conf: cleanup. use a pingu_conf structNatanael Copa2011-08-053-32/+47
|
* pingu_conf: fix lineno on error messagesNatanael Copa2011-08-051-9/+9
| | | | and some whitespace fixes
* pingu: implement new config formatNatanael Copa2011-08-059-245/+323
| | | | | | | | | | | | | | | | | | | | | 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-022-6/+9
|
* pingu: use source address for ip rule and copy scope link routeNatanael Copa2011-08-023-19/+42
|
* pingu: use host label when logging instead of ip addrNatanael Copa2011-07-292-7/+4
|
* pingu: fix bug when storing addrinfo struct to sockaddr_anyNatanael Copa2011-07-293-11/+53
|
* pingu: remove default gw from main route table when isp goes downNatanael Copa2011-07-295-4/+31
|
* pingu: delete gateway from our listNatanael Copa2011-07-281-0/+49
|
* pingu: clean up for ipv6 support in futureNatanael Copa2011-07-283-68/+121
| | | | | | | 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-285-15/+52
| | | | | | | | - 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_netlink: remove duplicate routing code.Natanael Copa2011-07-281-43/+16
|
* pingu: use sockaddr_anyNatanael Copa2011-07-288-37/+122
| | | | add common sockaddr utility functions
* Use sockaddr_any for storing address and gatewayNatanael Copa2011-07-283-4/+18
|
* pingu_netlink: add support for metric and sync deleted routesNatanael Copa2011-07-221-19/+98
| | | | | If a route is manually removed in main table we also remove it from our separate route table.
* pingu: create or delete ip rule on link status changeNatanael Copa2011-07-211-7/+58
| | | | | When we detect link on interface we create a route rule and we delete it when we lose the link.
* pingu: add initial code to modify routing tablesNatanael Copa2011-07-215-9/+105
| | | | | 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-153-10/+87
|
* pingu_netlink: monitor link status of interfaces via netlinkNatanael Copa2011-07-137-6/+334
|
* pingu_iface: implement pingu_iface_usable()Natanael Copa2011-07-134-2/+10
| | | | To test if we can use socket.
* pingu: try bind socket to interface every burstNatanael Copa2011-07-137-21/+46
| | | | | | 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
|
* add gitignoreNatanael Copa2011-07-131-0/+3
|
* pingu: run the route-script againNatanael Copa2011-07-082-51/+50
|
* pingu_ping: improve debug message for repliesNatanael Copa2011-07-081-1/+3
|
* list.h: add missing fileNatanael Copa2011-07-081-0/+112
|
* pingu: move config reading to pingu_host and make host_list globalNatanael Copa2011-07-083-147/+149
|
* pingu: remove unused codeNatanael Copa2011-07-081-122/+0
|