Changeset 21424
 Timestamp:
 20100511T03:27:26+02:00 (8 years ago)
 Location:
 packages/net/multiwan
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

packages/net/multiwan/Makefile
r21416 r21424 9 9 10 10 PKG_NAME:=multiwan 11 PKG_VERSION:=1.0. 712 PKG_RELEASE:= 211 PKG_VERSION:=1.0.8 12 PKG_RELEASE:=1 13 13 14 14 include $(INCLUDE_DIR)/package.mk 
packages/net/multiwan/files/usr/bin/multiwan
r21416 r21424 639 639 local last_probability 640 640 local total_weight 641 local total_wans 641 642 local i 643 local x 644 local y 642 645 643 646 echo "## Refreshing Load Balancer ##" … … 659 662 660 663 total_weight=0 664 total_wans=0 661 665 last_probability=0 666 x=0 667 y=0 662 668 663 669 iptables F MultiWanLoadBalancer t mangle … … 673 679 if [ "$gateway" != "x" a "$ifname" != "x" a "$failchk" != "x" a "$weight" != "disable" ]; then 674 680 total_weight=$(expr $total_weight + $weight) 681 total_wans=$i 675 682 fi 676 683 done … … 688 695 if [ "$gateway" != "x" a "$ifname" != "x" a "$failchk" != "x" a "$weight" != "disable" ]; then 689 696 nexthop="$nexthop nexthop via $gateway dev $ifname weight $weight" 690 rand_probability=$(expr $(expr $weight \* 100) / $total_weight + $last_probability) 691 last_probability=$rand_probability 697 y=$last_probability 698 last_probability=$(expr $x / $(expr $wancount  $i + 1)) 699 rand_probability=$(expr $(expr $(expr $weight \* 100) / $total_weight) + $last_probability + $y) 700 x=$rand_probability 692 701 693 702 if [ $rand_probability lt 10 ]; then 694 703 rand_probability="0.0${rand_probability}" 695 elif [ $rand_probability lt 100 a $i != $ wancount]; then704 elif [ $rand_probability lt 100 a $i != $total_wans ]; then 696 705 rand_probability="0.${rand_probability}" 697 706 else
Note: See TracChangeset
for help on using the changeset viewer.