chain, ip->addr, ip->mask, interface->name, limit_pkts);\r
iptables_save_line(str, ip->v6);\r
\r
- /* classify overlimit packets to separate overlimit class */\r
- sprintf(str, "-A %s -d %s/%d -o %s -j %s%d",\r
- chain, ip->addr, ip->mask,\r
- interface->name, mark_iptables, OVERLIMIT_CLASS);\r
- iptables_save_line(str, ip->v6);\r
-\r
- sprintf(str, "-A %s -d %s/%d -o %s -j ACCEPT",\r
- chain, ip->addr, ip->mask, interface->name);\r
- iptables_save_line(str, ip->v6);\r
+ if(limit_pkts)\r
+ {\r
+ /* classify overlimit packets to separate overlimit class */\r
+ sprintf(str, "-A %s -d %s/%d -o %s -j %s%d",\r
+ chain, ip->addr, ip->mask,\r
+ interface->name, mark_iptables, OVERLIMIT_CLASS);\r
+ iptables_save_line(str, ip->v6);\r
+\r
+ sprintf(str, "-A %s -d %s/%d -o %s -j ACCEPT",\r
+ chain, ip->addr, ip->mask, interface->name);\r
+ iptables_save_line(str, ip->v6);\r
+ }\r
\r
if(ip->min)\r
{\r