svn commit: r201722 - head/sys/netinet/ipfw
Luigi Rizzo
luigi at FreeBSD.org
Thu Jan 7 09:28:17 UTC 2010
Author: luigi
Date: Thu Jan 7 09:28:17 2010
New Revision: 201722
URL: http://svn.freebsd.org/changeset/base/201722
Log:
put ip_len in correct order for ip_output().
This prevents a panic when ipfw generates packets on its own
(such as reject or keepalives for dynamic rules).
Reported by: Chagin Dmitry
Modified:
head/sys/netinet/ipfw/ip_fw_dynamic.c
Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jan 7 09:21:13 2010 (r201721)
+++ head/sys/netinet/ipfw/ip_fw_dynamic.c Thu Jan 7 09:28:17 2010 (r201722)
@@ -1002,7 +1002,8 @@ ipfw_send_pkt(struct mbuf *replyto, stru
h->ip_hl = sizeof(*h) >> 2;
h->ip_tos = IPTOS_LOWDELAY;
h->ip_off = 0;
- h->ip_len = htons(len);
+ /* ip_len must be in host format for ip_output */
+ h->ip_len = len;
h->ip_ttl = V_ip_defttl;
h->ip_sum = 0;
break;
More information about the svn-src-all
mailing list