summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 1a8e537..dc7d965 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off)
last = NULL;
ifp = m->m_pkthdr.rcvif;
+ /*
+ * Add back the IP header length which was
+ * removed by ip_input(). Raw sockets do
+ * not modify the packet except for some
+ * byte order swaps.
+ */
+ ip->ip_len += off;
hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr,
ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask);
OpenPOWER on IntegriCloud