+set_redirect(struct fw3_ipt_rule *r, struct fw3_port *port)
+{
+ char buf[sizeof("65535-65535\0")];
+
+ fw3_ipt_rule_target(r, "REDIRECT");
+
+ if (port && port->set)
+ {
+ if (port->port_min == port->port_max)
+ sprintf(buf, "%u", port->port_min);
+ else
+ sprintf(buf, "%u-%u", port->port_min, port->port_max);
+
+ fw3_ipt_rule_addarg(r, false, "--to-ports", buf);
+ }
+}
+
+static void