aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_tcpmss.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2007-01-15 05:01:31 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2007-01-15 05:01:31 +0000
commitbc12a09303d2aee39ef641250ea7852df2074b0a (patch)
tree2776ba26f4a729f951a5f62fd575f4067be54eeb /sys/netgraph/ng_tcpmss.c
parentc5bebabde15c5f71a9c8244a95efe84753e89bbf (diff)
downloadsrc-bc12a09303d2aee39ef641250ea7852df2074b0a.tar.gz
src-bc12a09303d2aee39ef641250ea7852df2074b0a.zip
Notes
Diffstat (limited to 'sys/netgraph/ng_tcpmss.c')
-rw-r--r--sys/netgraph/ng_tcpmss.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netgraph/ng_tcpmss.c b/sys/netgraph/ng_tcpmss.c
index 88bcafa2d17c..ac951e6a7fdd 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