1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

Update ip and tcp pointers after m_pullup().

Submitted by:	Alexander Motin <mav alkar.net>
This commit is contained in:
Gleb Smirnoff 2007-01-15 05:01:31 +00:00
parent c5bebabde1
commit bc12a09303
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166018

View File

@ -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