diff --git a/html/cgi-bin/loxilbconfig.cgi b/html/cgi-bin/loxilbconfig.cgi index 9e543d58b..b5628cf1a 100644 --- a/html/cgi-bin/loxilbconfig.cgi +++ b/html/cgi-bin/loxilbconfig.cgi @@ -276,8 +276,12 @@ if ($settings{'KEY1'} ne '') { &Header::openbox('100%', 'left', $Lang::tr{'loxilb lb add'}); } +my @PROTOCOLS = ("tcp", "udp"); +my @ALGO = ("rr", "hash", "priority", "persist", "lc"); +my @MODE = ("default", "onearm", "fullnat", "dsr"); + #Edited line number (KEY1) passed until cleared by 'save' or 'remove' or 'new sort order' -print < @@ -296,15 +300,64 @@ print < - + - + + - + + @@ -323,7 +376,7 @@ print < END -; + &Header::closebox(); &Header::openbox('100%', 'left', $Lang::tr{'loxilb lb config entries'}); @@ -524,12 +577,20 @@ sub SortDataFile # Build the configuration file # sub CreateLB { - my (%settings) = @_; + my $sel; + my $mode; my @loxicmd_options; my $command = 'loxicmd'; my $name = "--name=" . "$settings{'NAME'}"; my $proto = "--" . "$settings{'PROTO'}" . "=" . "$settings{'PORT'}" . ":" . "$settings{'EPORT'}"; + + if ($settings{'SEL'}) { + $sel = "--select=" . "$settings{'SEL'}"; + } + if ($settings{'MODE'}) { + $mode = "--mode=" . "$settings{'MODE'}"; + } my $tmp = $settings{'ENDPOINTS'}; $tmp =~ s/\|/,/g; my $endpoints = "--endpoints=$tmp"; @@ -537,6 +598,12 @@ sub CreateLB { push(@loxicmd_options, "$settings{'EXTIP'}"); push(@loxicmd_options, "$name"); push(@loxicmd_options, "$proto"); + if ($sel) { + push(@loxicmd_options, "$sel"); + } + if ($mode) { + push(@loxicmd_options, "$mode"); + } push(@loxicmd_options, "$endpoints"); &General::system($command, @loxicmd_options); }
$Lang::tr{'loxilb lb proto'}:  +
$Lang::tr{'loxilb lb sel'}:  +
$Lang::tr{'loxilb lb mode'}:  +
$Lang::tr{'loxilb lb endpoints'}: