浏览代码

Merge branch 'nf' of git://1984.lsi.us.es/net

David S. Miller 13 年之前
父节点
当前提交
6350323ad8
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      net/netfilter/xt_connbytes.c

+ 3 - 3
net/netfilter/xt_connbytes.c

@@ -87,10 +87,10 @@ connbytes_mt(const struct sk_buff *skb, struct xt_action_param *par)
 		break;
 	}
 
-	if (sinfo->count.to)
+	if (sinfo->count.to >= sinfo->count.from)
 		return what <= sinfo->count.to && what >= sinfo->count.from;
-	else
-		return what >= sinfo->count.from;
+	else /* inverted */
+		return what < sinfo->count.to || what > sinfo->count.from;
 }
 
 static int connbytes_mt_check(const struct xt_mtchk_param *par)