sbin/mbse-firewall

changeset 14
654773d80b70
parent 13
06b03eeae540
equal deleted inserted replaced
13:06b03eeae540 14:654773d80b70
20 # You should have received a copy of the GNU General Public License 20 # You should have received a copy of the GNU General Public License
21 # along with this program; see the file COPYING. If not, write to the Free 21 # along with this program; see the file COPYING. If not, write to the Free
22 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 22 # Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
23 # --------------------------------------------------------------------------- 23 # ---------------------------------------------------------------------------
24 24
25 MBSEFW_VERSION="0.0.26" 25 MBSEFW_VERSION="0.0.27"
26 26
27 # Sanity checks 27 # Sanity checks
28 if [ "$(id -u)" != "0" ]; then 28 if [ "$(id -u)" != "0" ]; then
29 echo "** You must be root to run this program" 29 echo "** You must be root to run this program"
30 exit 1 30 exit 1
568 else 568 else
569 args=("-A" "$NCHAIN" "$iodir" "${INTF}") 569 args=("-A" "$NCHAIN" "$iodir" "${INTF}")
570 fi 570 fi
571 571
572 # Protocol 572 # Protocol
573 [ -n "$3" ] && args+=("-p" "$3" "-m" "$3") 573 [ -n "$3" ] && {
574 if [ "$3" = "igmp" ]; then
575 args+=("-p" "$3")
576 else
577 args+=("-p" "$3" "-m" "$3")
578 fi
579 }
574 580
575 # Test for multiport 581 # Test for multiport
576 multi=0 582 multi=0
577 [ -n "$5$7" ] && { 583 [ -n "$5$7" ] && {
578 [[ $5$7 == *","* ]] && multi=1 584 [[ $5$7 == *","* ]] && multi=1

mercurial