Changeset 22228


Ignore:
Timestamp:
2010-07-16T08:05:23+02:00 (7 years ago)
Author:
jow
Message:

[backfire] firewall: allow redirecting only destination port (#7197)

Location:
branches/backfire/package/firewall
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/backfire/package/firewall/Makefile

    r22216 r22228  
    1010 
    1111PKG_VERSION:=1 
    12 PKG_RELEASE:=11 
     12PKG_RELEASE:=12 
    1313 
    1414include $(INCLUDE_DIR)/package.mk 
  • branches/backfire/package/firewall/files/uci_firewall.sh

    r22216 r22228  
    354354        config_get dest_port $1 dest_port 
    355355        config_get proto $1 proto 
    356         [ -z "$src" -o -z "$dest_ip" ] && { \ 
    357                 echo "redirect needs src and dest_ip"; return ; } 
     356        [ -z "$src" -o -z "$dest_ip$dest_port" ] && { \ 
     357                echo "redirect needs src and dest_ip or dest_port"; return ; } 
    358358 
    359359        find_item "$src" $CONNTRACK_ZONES || \ 
     
    386386                        -j DNAT --to-destination $dest_ip${dest_port:+:$dest_port} 
    387387 
     388                [ -n "$dest_ip" ] && \ 
    388389                $IPTABLES -I zone_${src}_forward 1 \ 
    389390                        ${proto:+-p $proto} \ 
Note: See TracChangeset for help on using the changeset viewer.