* [PATCHv2 3/4] DCCP: Fix to check missing sequence number for ICMP
@ 2008-07-25 2:40 Wei Yongjun
0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2008-07-25 2:40 UTC (permalink / raw)
To: dccp
If we want check the sequence number, the length of dccp packet must not
less than __dccp_basic_hdr_len(dh). If the length of dccp packet is less
than this value, check for sequence number will get unpredictable result.
This patch fix the problem.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
net/dccp/ipv4.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 8fd4d57..0c5f82d 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -207,7 +207,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info)
int err;
struct net *net = dev_net(skb->dev);
- if (skb->len < (iph->ihl << 2) + 8) {
+ if (skb->len < (iph->ihl << 2) + __dccp_basic_hdr_len(dh)) {
ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
return;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-25 2:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25 2:40 [PATCHv2 3/4] DCCP: Fix to check missing sequence number for ICMP Wei Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).