mirror of
https://github.com/novatiq/packages.git
synced 2026-07-04 19:19:31 +01:00
66406f98db
This commit fixed what6d99b602was supposed to fix without affecting interface-bound traffic. Before6d99b602interface-bound traffic was working normally as long as at least one interface was online. However when the last interface went offline, it was impossible to ping and such state was unrecoverable. Commit6d99b602fixed unrecoverable offline state problem (it was possible to ping -I iface) but messed inteface-bound traffic. Traffic with interface source address was not working if the interface was in "offline" state, even if another interface was online. The problem was caused by an inconsistent "offline" interface state: iptables-related rules were kept while routing table and policy were deleted. The idea behind this commit is to: 1. Keep all the rules for each interface (iptables, routing table, policy) regardless of its state. This ensures consistency, 2. Make interface state hotplug events affect only iptables' mwan3_policy_* rules. Interface-related iptables, routing table and policy is removed only when mwan3 is manually stopped. To make such changes possible, it's necessary to change the way mwan3_policy_* rule generator keeps track of interface state hotplug events. Until now, it checked for the existence of custom interface-related routing table (table id 1, 2, 3, ...). Clearly we can no longer rely on that so each interface state is stored explicitly in file. Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
63 lines
1.3 KiB
Makefile
63 lines
1.3 KiB
Makefile
#
|
|
# Copyright (C) 2006-2014 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=mwan3
|
|
PKG_VERSION:=2.6.5
|
|
PKG_RELEASE:=1
|
|
PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
|
|
PKG_LICENSE:=GPLv2
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/mwan3
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
SUBMENU:=Routing and Redirection
|
|
DEPENDS:=+ip +ipset +iptables +iptables-mod-conntrack-extra +iptables-mod-ipopt
|
|
TITLE:=Multiwan hotplug script with connection tracking support
|
|
MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
|
|
PKGARCH:=all
|
|
endef
|
|
|
|
define Package/mwan3/description
|
|
Hotplug script which makes configuration of multiple WAN interfaces simple
|
|
and manageable. With loadbalancing/failover support for up to 250 wan
|
|
interfaces, connection tracking and an easy to manage traffic ruleset.
|
|
endef
|
|
|
|
define Package/mwan3/conffiles
|
|
/etc/config/mwan3
|
|
/etc/mwan3.user
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/mwan3/postinst
|
|
#!/bin/sh
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
/etc/init.d/rpcd restart
|
|
fi
|
|
exit 0
|
|
endef
|
|
|
|
define Package/mwan3/postrm
|
|
#!/bin/sh
|
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
|
/etc/init.d/rpcd restart
|
|
fi
|
|
exit 0
|
|
endef
|
|
|
|
define Package/mwan3/install
|
|
$(CP) ./files/* $(1)
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,mwan3))
|