Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | pingu_netlink: remove ip rule before we reset the address | Natanael Copa | 2011-09-08 | 1 | -1/+1 | |
| | | | | We use the address when removing the ip rule. | |||||
* | pingu_iface: only update multpath route when route is a default gw | Natanael Copa | 2011-09-08 | 1 | -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 later | Natanael Copa | 2011-09-08 | 1 | -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 Copa | 2011-09-08 | 2 | -1/+10 | |
| | | | | Finds first default gateway in list. | |||||
* | pingu_netlink: flush route tables on exit | Natanael Copa | 2011-09-07 | 1 | -0/+26 | |
| | ||||||
* | pingu_iface: cleanup load-balance route on exit | Natanael Copa | 2011-09-07 | 1 | -2/+19 | |
| | ||||||
* | pingu_{iface,netlink}: only remove route rules that we actually created | Natanael Copa | 2011-09-07 | 4 | -4/+15 | |
| | ||||||
* | pingu_netlink: get errorcodes from route changes | Natanael Copa | 2011-09-07 | 1 | -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 burst | Natanael Copa | 2011-09-06 | 1 | -0/+7 | |
| | | | | In case the bind failed on the got-address event. | |||||
* | pingu_iface: bind to interface too | Natanael Copa | 2011-09-06 | 1 | -0/+5 | |
| | | | | This is so we only see the pings for that interface | |||||
* | pingu: cleanup on exit | Natanael Copa | 2011-09-06 | 5 | -1/+29 | |
| | | | | We remove the ip rule, close the ping sockets and netlink sockets. | |||||
* | pingu: catch SIGINT so we can cleanup at exit | Natanael Copa | 2011-09-06 | 1 | -0/+10 | |
| | ||||||
* | pingu: only create/lose binding when we get/lose address | Natanael Copa | 2011-09-06 | 4 | -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 oif | Natanael Copa | 2011-09-06 | 3 | -2/+17 | |
| | | | | | Seems like ip rule does not work with source address unless we bind to address | |||||
* | pingu_netlink: fix logging of routes | Natanael Copa | 2011-09-06 | 1 | -3/+5 | |
| | | | | Sometimes we have via a gateway and sometimes we don't. | |||||
* | pingu_netlink: create nexthop route even if its alone | Natanael Copa | 2011-08-18 | 1 | -3/+1 | |
| | | | | | Otherwise it will not adjust the default route if one of the ISPs goes down. | |||||
* | pingu: add config option 'load-balance' | Natanael Copa | 2011-08-16 | 3 | -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 commit | Natanael Copa | 2011-08-16 | 1 | -1/+1 | |
| | ||||||
* | pingu: implement load balancing with nexthops | Natanael Copa | 2011-08-15 | 3 | -15/+137 | |
| | | | | We do loadbalancing by creating a new default gw with nexthops | |||||
* | pingu_gateway: move is_default_gw | Natanael Copa | 2011-08-15 | 3 | -17/+19 | |
| | | | | It belongs in pingu_gateway | |||||
* | pingu_netlink: log error responses | Natanael Copa | 2011-08-15 | 1 | -0/+13 | |
| | ||||||
* | pingu_gateway: cleanup. split out gateway funcs | Natanael Copa | 2011-08-05 | 5 | -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 struct | Natanael Copa | 2011-08-05 | 3 | -32/+47 | |
| | ||||||
* | pingu_conf: fix lineno on error messages | Natanael Copa | 2011-08-05 | 1 | -9/+9 | |
| | | | | and some whitespace fixes | |||||
* | pingu: implement new config format | Natanael Copa | 2011-08-05 | 9 | -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 create | Natanael Copa | 2011-08-02 | 2 | -6/+9 | |
| | ||||||
* | pingu: use source address for ip rule and copy scope link route | Natanael Copa | 2011-08-02 | 3 | -19/+42 | |
| | ||||||
* | pingu: use host label when logging instead of ip addr | Natanael Copa | 2011-07-29 | 2 | -7/+4 | |
| | ||||||
* | pingu: fix bug when storing addrinfo struct to sockaddr_any | Natanael Copa | 2011-07-29 | 3 | -11/+53 | |
| | ||||||
* | pingu: remove default gw from main route table when isp goes down | Natanael Copa | 2011-07-29 | 5 | -4/+31 | |
| | ||||||
* | pingu: delete gateway from our list | Natanael Copa | 2011-07-28 | 1 | -0/+49 | |
| | ||||||
* | pingu: clean up for ipv6 support in future | Natanael Copa | 2011-07-28 | 3 | -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 cleanup | Natanael Copa | 2011-07-28 | 5 | -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 Copa | 2011-07-28 | 1 | -43/+16 | |
| | ||||||
* | pingu: use sockaddr_any | Natanael Copa | 2011-07-28 | 8 | -37/+122 | |
| | | | | add common sockaddr utility functions | |||||
* | Use sockaddr_any for storing address and gateway | Natanael Copa | 2011-07-28 | 3 | -4/+18 | |
| | ||||||
* | pingu_netlink: add support for metric and sync deleted routes | Natanael Copa | 2011-07-22 | 1 | -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 change | Natanael Copa | 2011-07-21 | 1 | -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 tables | Natanael Copa | 2011-07-21 | 5 | -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 interfaces | Natanael Copa | 2011-07-15 | 3 | -10/+87 | |
| | ||||||
* | pingu_netlink: monitor link status of interfaces via netlink | Natanael Copa | 2011-07-13 | 7 | -6/+334 | |
| | ||||||
* | pingu_iface: implement pingu_iface_usable() | Natanael Copa | 2011-07-13 | 4 | -2/+10 | |
| | | | | To test if we can use socket. | |||||
* | pingu: try bind socket to interface every burst | Natanael Copa | 2011-07-13 | 7 | -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 bug | Natanael Copa | 2011-07-13 | 1 | -1/+1 | |
| | ||||||
* | add gitignore | Natanael Copa | 2011-07-13 | 1 | -0/+3 | |
| | ||||||
* | pingu: run the route-script again | Natanael Copa | 2011-07-08 | 2 | -51/+50 | |
| | ||||||
* | pingu_ping: improve debug message for replies | Natanael Copa | 2011-07-08 | 1 | -1/+3 | |
| | ||||||
* | list.h: add missing file | Natanael Copa | 2011-07-08 | 1 | -0/+112 | |
| | ||||||
* | pingu: move config reading to pingu_host and make host_list global | Natanael Copa | 2011-07-08 | 3 | -147/+149 | |
| | ||||||
* | pingu: remove unused code | Natanael Copa | 2011-07-08 | 1 | -122/+0 | |
| |