diff options
author | luigi <luigi@FreeBSD.org> | 2010-01-07 09:28:17 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2010-01-07 09:28:17 +0000 |
commit | 6a3745e3ec8e2285e9cd40afcafe3aa03c608b21 (patch) | |
tree | 948c077d481f993ac6e13fd9d38d20e52768baf0 /sys/netinet | |
parent | 3d4c810fbed5abd3f583bb74b53125f3fdcdf5da (diff) | |
download | FreeBSD-src-6a3745e3ec8e2285e9cd40afcafe3aa03c608b21.zip FreeBSD-src-6a3745e3ec8e2285e9cd40afcafe3aa03c608b21.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ipfw/ip_fw_dynamic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ipfw/ip_fw_dynamic.c b/sys/netinet/ipfw/ip_fw_dynamic.c index 6d1ac60..ad5599a 100644 --- a/sys/netinet/ipfw/ip_fw_dynamic.c +++ b/sys/netinet/ipfw/ip_fw_dynamic.c @@ -1002,7 +1002,8 @@ ipfw_send_pkt(struct mbuf *replyto, struct ipfw_flow_id *id, u_int32_t seq, 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; |