From 1194f7c42a8d08e65aaa26c97637e7e454076f3f Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 1 Jun 2005 18:20:40 +0000 Subject: [PATCH] Allow route weight to be specified via 'balance=' git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@2210 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/changelog.txt | 4 ++++ Shorewall2/firewall | 3 +++ Shorewall2/providers | 7 ++++++- Shorewall2/releasenotes.txt | 7 ++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Shorewall2/changelog.txt b/Shorewall2/changelog.txt index 29e223769..847997c8d 100644 --- a/Shorewall2/changelog.txt +++ b/Shorewall2/changelog.txt @@ -1,3 +1,7 @@ +Changes in 2.4.0-Final + +1) Add the ability to specify a weight in the balance option. + Changes in 2.4.0-RC2 1) Relax "detect" restriction. diff --git a/Shorewall2/firewall b/Shorewall2/firewall index ec78f9c6f..6f3763250 100755 --- a/Shorewall2/firewall +++ b/Shorewall2/firewall @@ -1136,6 +1136,9 @@ setup_providers() eval ${iface}_routemark=$mark ROUTEMARK_INTERFACES="$ROUTEMARK_INTERFACES $interface" ;; + balance=*) + DEFAULT_ROUTE="$DEFAULT_ROUTE nexthop via $gateway dev $interface weight ${option#*=}" + ;; balance) DEFAULT_ROUTE="$DEFAULT_ROUTE nexthop via $gateway dev $interface weight 1" ;; diff --git a/Shorewall2/providers b/Shorewall2/providers index 4dba84ede..c408d740f 100755 --- a/Shorewall2/providers +++ b/Shorewall2/providers @@ -45,7 +45,12 @@ # connecting to local servers through this provider. # # balance The providers that have 'default' specified will -# get outbound traffic load-balanced among them. +# get outbound traffic load-balanced among them. By +# default, all interfaces with 'balance' specified +# will have the same weight (1). You can change the +# weight of an interface by specifiying balance= +# where is the weight of the route out of +# this interface. # # Example: You run squid in your DMZ on IP address 192.168.2.99. Your DMZ # interface is eth2 diff --git a/Shorewall2/releasenotes.txt b/Shorewall2/releasenotes.txt index b2dc5b75b..c8146228d 100755 --- a/Shorewall2/releasenotes.txt +++ b/Shorewall2/releasenotes.txt @@ -71,7 +71,12 @@ New Features in version 2.4.0 better yet, use the CLASSIFY target). balance The providers that have 'balance' specified will - get outbound traffic load-balanced among them. + get outbound traffic load-balanced among them. By + default, all interfaces with 'balance' specified + will have the same weight (1). You can change the + weight of the route out of the interface by + specifiying balance= where is + the desired route weight. Example: You run squid in your DMZ on IP address 192.168.2.99. Your DMZ interface is eth2