提交 fd841326 编写于 作者: P Patrick McHardy 提交者: David S. Miller

[NETFILTER]: Fix ECN target TCP marking

An incorrect check made it bail out before doing anything.
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a5ea169c
......@@ -61,10 +61,10 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
if (!tcph)
return 0;
if (!(einfo->operation & IPT_ECN_OP_SET_ECE
|| tcph->ece == einfo->proto.tcp.ece)
&& (!(einfo->operation & IPT_ECN_OP_SET_CWR
|| tcph->cwr == einfo->proto.tcp.cwr)))
if ((!(einfo->operation & IPT_ECN_OP_SET_ECE) ||
tcph->ece == einfo->proto.tcp.ece) &&
((!(einfo->operation & IPT_ECN_OP_SET_CWR) ||
tcph->cwr == einfo->proto.tcp.cwr)))
return 1;
if (!skb_ip_make_writable(pskb, (*pskb)->nh.iph->ihl*4+sizeof(*tcph)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册