Date: Thu, 7 Jan 2010 09:28:17 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r201722 - head/sys/netinet/ipfw Message-ID: <201001070928.o079SHKU007077@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001070928.o079SHKU007077>