Allow devices for src_ip, src_dip and dest_ip options
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 25 May 2013 16:00:04 +0000 (18:00 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 25 May 2013 16:14:57 +0000 (18:14 +0200)
redirects.c
rules.c

index aec47fd..d1aa0f0 100644 (file)
@@ -32,14 +32,14 @@ const struct fw3_option fw3_redirect_opts[] = {
 
        FW3_LIST("proto",              protocol,  redirect,     proto),
 
 
        FW3_LIST("proto",              protocol,  redirect,     proto),
 
-       FW3_OPT("src_ip",              address,   redirect,     ip_src),
+       FW3_OPT("src_ip",              network,   redirect,     ip_src),
        FW3_LIST("src_mac",            mac,       redirect,     mac_src),
        FW3_OPT("src_port",            port,      redirect,     port_src),
 
        FW3_LIST("src_mac",            mac,       redirect,     mac_src),
        FW3_OPT("src_port",            port,      redirect,     port_src),
 
-       FW3_OPT("src_dip",             address,   redirect,     ip_dest),
+       FW3_OPT("src_dip",             network,   redirect,     ip_dest),
        FW3_OPT("src_dport",           port,      redirect,     port_dest),
 
        FW3_OPT("src_dport",           port,      redirect,     port_dest),
 
-       FW3_OPT("dest_ip",             address,   redirect,     ip_redir),
+       FW3_OPT("dest_ip",             network,   redirect,     ip_redir),
        FW3_OPT("dest_port",           port,      redirect,     port_redir),
 
        FW3_OPT("extra",               string,    redirect,     extra),
        FW3_OPT("dest_port",           port,      redirect,     port_redir),
 
        FW3_OPT("extra",               string,    redirect,     extra),
diff --git a/rules.c b/rules.c
index 145b71f..0f4e925 100644 (file)
--- a/rules.c
+++ b/rules.c
@@ -32,11 +32,11 @@ const struct fw3_option fw3_rule_opts[] = {
 
        FW3_LIST("proto",              protocol,  rule,     proto),
 
 
        FW3_LIST("proto",              protocol,  rule,     proto),
 
-       FW3_LIST("src_ip",             address,   rule,     ip_src),
+       FW3_LIST("src_ip",             network,   rule,     ip_src),
        FW3_LIST("src_mac",            mac,       rule,     mac_src),
        FW3_LIST("src_port",           port,      rule,     port_src),
 
        FW3_LIST("src_mac",            mac,       rule,     mac_src),
        FW3_LIST("src_port",           port,      rule,     port_src),
 
-       FW3_LIST("dest_ip",            address,   rule,     ip_dest),
+       FW3_LIST("dest_ip",            network,   rule,     ip_dest),
        FW3_LIST("dest_port",          port,      rule,     port_dest),
 
        FW3_LIST("icmp_type",          icmptype,  rule,     icmp_type),
        FW3_LIST("dest_port",          port,      rule,     port_dest),
 
        FW3_LIST("icmp_type",          icmptype,  rule,     icmp_type),