From 302053445c0c75c670643bbd7b9aa78e164f02bd Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 13 Aug 2005 23:09:49 +0000 Subject: Set pipes up first --- packages/per-user-bandwidth-distribution.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/per-user-bandwidth-distribution.xml b/packages/per-user-bandwidth-distribution.xml index c58c8b00..18b28f18 100644 --- a/packages/per-user-bandwidth-distribution.xml +++ b/packages/per-user-bandwidth-distribution.xml @@ -44,11 +44,11 @@ $fd = fopen("/usr/local/etc/rc.d/per_user_bandwidth_distribution.sh","w"); fwrite($fd, "/sbin/kldload dummynet"); + fwrite($fd, "/sbin/ipfw pipe 1 config mask src-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}"); + fwrite($fd, "/sbin/ipfw pipe 2 config mask dst-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}"); fwrite($fd, "/sbin/ipfw add 10 pipe 1 ip from any to any out via {$wanif}"); fwrite($fd, "/sbin/ipfw add 10 pipe 2 ip from any to any in via {$wanif}"); fwrite($fd, "/sbin/ipfw add allow all from any to any"); - fwrite($fd, "/sbin/ipfw pipe 1 config mask src-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}"); - fwrite($fd, "/sbin/ipfw pipe 2 config mask dst-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}"); fclose($fd); mwexec("chmod a+rx /usr/local/etc/rc.d/per_user_bandwidth_distribution.sh"); -- cgit v1.2.3