Skip to content

babeld-auto-gw-mode

https://github.com/libremesh/lime-packages/blob/master/packages/babeld-auto-gw-mode

Readme

# babeld-auto-gw-mode

By default babeld will redistribute all the routes installed even if they "don’t work". For example
when the internet provider use DHCP and the service is not working but interface is up, the route is
installed but not working and babeld will anounce the non working route to the network and also
this route will be used by this node to route the packets so also all its clients won’t have internet.

This package provides a solution using watchping hooks that:
* on wan OK
- adds a route with a special protocol number (7)
* on wan FAIL
- removes the default route with proto 7
- changes the metric of the default route to 84831. If other nodes are also gateways their babel
redistributable routes will have priority over this route at this node and for that reason the
default gateway won’t be the local non working connection.

Makefile

# Copyright (C) 2021 Santiago Piccinini <spiccinini@altermundi.net>
#
# This is free software, licensed under the GNU Affero General Public License v3.
#

include ../../libremesh.mk

define Package/$(PKG_NAME)
  SECTION:=lime
  CATEGORY:=LibreMesh
  TITLE:=Babel auto Internet gateway module.
  MAINTAINER:=Santiago Piccinini <spiccinini@altermundi.net>
  DEPENDS:=+libubus-lua +watchping +lime-proto-babeld +lime-system
  PKGARCH:=all
endef


define Package/$(PKG_NAME)/description
	Watchping hooks to set babeld Internet automatic announcements.
endef

$(eval $(call BuildPackage,$(PKG_NAME)))