Update ip and tcp pointers after m_pullup().

Submitted by:	Alexander Motin <mav alkar.net>
This commit is contained in:
glebius 2007-01-15 05:01:31 +00:00
parent 14527025f4
commit 3ff4e1770d

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