From 0b06ad0567fbbf647ea64a13d50c7ff2212f49be Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Sat, 8 Mar 2008 11:26:56 +0000 Subject: [PATCH] Some little code corrections git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1260 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- html/cgi-bin/optionsfw.cgi | 16 ++++++++-------- src/misc-progs/wirelessctrl.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/html/cgi-bin/optionsfw.cgi b/html/cgi-bin/optionsfw.cgi index ddb68e395..189395726 100644 --- a/html/cgi-bin/optionsfw.cgi +++ b/html/cgi-bin/optionsfw.cgi @@ -92,25 +92,25 @@ print < - - - - - -
$Lang::tr{'fw logging'}
$Lang::tr{'drop newnotsyn'}on / +
$Lang::tr{'drop newnotsyn'}on / off
$Lang::tr{'drop input'}on / +
$Lang::tr{'drop input'}on / off
$Lang::tr{'drop output'}on / +
$Lang::tr{'drop output'}on / off
$Lang::tr{'drop portscan'}on / +
$Lang::tr{'drop portscan'}on / off
$Lang::tr{'drop wirelessinput'}on / +
$Lang::tr{'drop wirelessinput'}on / off
$Lang::tr{'drop wirelessforward'}on / +
$Lang::tr{'drop wirelessforward'}on / off

- -
$Lang::tr{'fw blue'}
$Lang::tr{'drop proxy'}on / +
$Lang::tr{'drop proxy'}on / off
$Lang::tr{'drop samba'}on / +
$Lang::tr{'drop samba'}on / off

diff --git a/src/misc-progs/wirelessctrl.c b/src/misc-progs/wirelessctrl.c index 4dd569b35..01743a766 100644 --- a/src/misc-progs/wirelessctrl.c +++ b/src/misc-progs/wirelessctrl.c @@ -110,28 +110,28 @@ int main(void) } /* restrict blue access tp the proxy port */ - if(findkey(kv, "DROPPROXY", buffer) && strcmp(buffer,"on")){ + if(findkey(kv, "DROPPROXY", buffer) && strcmp(buffer,"off")){ /* Read the proxy values */ if (!readkeyvalues(kv, CONFIG_ROOT "/proxy/settings") || !(findkey(kv, "PROXY_PORT", buffer))) { fprintf(stderr, "Cannot read proxy settings\n"); exit(1); } - snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p tcp ! --dport %s -j DROP -m comment --comment 'DROP_Wirelessforward'", buffer, blue_dev); + snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -p tcp ! --dport %s -j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev, buffer); safe_system(command); - snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p tcp ! --dport %s -j DROP -m comment --comment 'DROP_Wirelessinput'", buffer, blue_dev); + snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p tcp ! --dport %s -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev, buffer); safe_system(command); } /* not allow blue to acces a samba server running on local fire*/ - if(findkey(kv, "DROPSAMBA", buffer) && strcmp(buffer,"on")){ - snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -p tcp -m multiport --dport 135,137,138,139,445,1025-j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev); + if(findkey(kv, "DROPSAMBA", buffer) && strcmp(buffer,"off")){ + snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -p tcp -m multiport --ports 135,137,138,139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev); safe_system(command); - snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p tcp -m multiport --dport 135,137,,138139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev); + snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p tcp -m multiport --ports 135,137,138,139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev); safe_system(command); - snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -p udp -m multiport --dport 135,137,138,139,445,1025-j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev); + snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSFORWARD -i %s -p udp -m multiport --ports 135,137,138,139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessforward'", blue_dev); safe_system(command); - snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p udp -m multiport --dport 135,137,138,139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev); + snprintf(command, STRING_SIZE-1, "/sbin/iptables -A WIRELESSINPUT -i %s -p udp -m multiport --ports 135,137,138,139,445,1025 -j DROP -m comment --comment 'DROP_Wirelessinput'", blue_dev); safe_system(command); } -- 2.39.2