6 Dec 2011 10:15
[PATCH 4/4] smart gateway: remove useless code in smartgw_tunnel_monitor
Ferry Huberts <mailings <at> hupie.com>
2011-12-06 09:15:00 GMT
2011-12-06 09:15:00 GMT
From: Ferry Huberts <f.huberts <at> mindef.nl>
Signed-off-by: Ferry Huberts <f.huberts <at> mindef.nl>
---
src/gateway.c | 19 +------------------
1 files changed, 1 insertions(+), 18 deletions(-)
diff --git a/src/gateway.c b/src/gateway.c
index 31a63ab..e3c4a56 100644
--- a/src/gateway.c
+++ b/src/gateway.c
<at> <at> -82,24 +82,7 <at> <at> serialize_gw_speed(uint32_t speed) {
*/
static void smartgw_tunnel_monitor (int if_index,
struct interface *ifh __attribute__ ((unused)), enum olsr_ifchg_flag flag) {
- if (current_ipv4_gw != NULL && if_index == v4gw_tunnel->if_index && flag == IFCHG_IF_ADD) {
- /* v4 tunnel up again, set route */
- /* no need to setup tunnel route, already setup by olsr_set_inet_gateway.
- olsr_os_inetgw_tunnel_route(v4gw_tunnel->if_index, true, true); */
-
- /* and ip */
- /* no need to setup ip, already setup by olsr_os_add_ipip_tunnel.
- olsr_os_ifip(v4gw_tunnel->if_index, &olsr_cnf->main_addr, true); */
- }
- if (current_ipv6_gw != NULL && if_index == v6gw_tunnel->if_index && flag == IFCHG_IF_ADD) {
- /* v6 status changed, set route */
- /* no need to setup tunnel route, already setup by olsr_set_inet_gateway.
- olsr_os_inetgw_tunnel_route(v6gw_tunnel->if_index, false, true); */
-
- /* and ip */
(Continue reading)
>
> The usual solution is to use some form of hysteresis. We might do
> something like 'if there is a better gateway for at least x seconds,
> then switch to it'.
>
> What do you think?
I think there should be some API calls to overwrite the gateway selector
from a plugin, so maybe we could put your selector into one so users can
choose between them.
At least that was the plan when I designed the code, I don't think
anyone has ever wrote a Smart-GW plugin.
Henning
RSS Feed