diff options
author | glebius <glebius@FreeBSD.org> | 2007-01-15 05:01:31 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2007-01-15 05:01:31 +0000 |
commit | 3ff4e1770d32d5584e15768f76a32a3004edcf35 (patch) | |
tree | 2776ba26f4a729f951a5f62fd575f4067be54eeb /sys/netgraph | |
parent | 14527025f48b8b94f37b882093fd59199d126f8b (diff) | |
download | FreeBSD-src-3ff4e1770d32d5584e15768f76a32a3004edcf35.zip FreeBSD-src-3ff4e1770d32d5584e15768f76a32a3004edcf35.tar.gz |
Update ip and tcp pointers after m_pullup().
Submitted by: Alexander Motin <mav alkar.net>
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_tcpmss.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netgraph/ng_tcpmss.c b/sys/netgraph/ng_tcpmss.c index 88bcafa..ac951e6 100644 --- a/sys/netgraph/ng_tcpmss.c +++ b/sys/netgraph/ng_tcpmss.c @@ -315,6 +315,7 @@ ng_tcpmss_rcvdata(hook_p hook, item_p item) /* Check mbuf packet size and arrange for IP+TCP header */ M_CHECK(iphlen - sizeof(struct ip) + sizeof(struct tcphdr)); + ip = mtod(m, struct ip *); tcp = (struct tcphdr *)((caddr_t )ip + iphlen); /* Check TCP header length. */ @@ -330,6 +331,8 @@ ng_tcpmss_rcvdata(hook_p hook, item_p item) priv->stats.SYNPkts++; M_CHECK(tcphlen - sizeof(struct tcphdr)); + ip = mtod(m, struct ip *); + tcp = (struct tcphdr *)((caddr_t )ip + iphlen); #undef M_CHECK |