Date: Tue, 29 Jan 2019 11:18:41 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343551 - head/sys/netpfil/ipfw Message-ID: <201901291118.x0TBIfdQ005808@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Tue Jan 29 11:18:41 2019 New Revision: 343551 URL: https://svnweb.freebsd.org/changeset/base/343551 Log: Fix the bug introduced in r342908, that causes problems with dynamic handling for protocols without ports numbers. Since port numbers were uninitialized for protocols like ICMP/ICMPv6, ipfw_chk() used some non-zero values to create dynamic states, and due this it failed to match replies with created states. Reported by: Oliver Hartmann, Boris Lytochkin Obtained from: Yandex LLC X-MFC after: r342908 Modified: head/sys/netpfil/ipfw/ip_fw2.c Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Tue Jan 29 11:04:17 2019 (r343550) +++ head/sys/netpfil/ipfw/ip_fw2.c Tue Jan 29 11:18:41 2019 (r343551) @@ -1410,6 +1410,7 @@ ipfw_chk(struct ip_fw_args *args) dst_ip.s_addr = 0; /* make sure it is initialized */ src_ip.s_addr = 0; /* make sure it is initialized */ + src_port = dst_port = 0; pktlen = m->m_pkthdr.len; DYN_INFO_INIT(&dyn_info); @@ -1688,7 +1689,6 @@ do { \ args->f_id.dst_ip = ntohl(dst_ip.s_addr); } else { proto = 0; - src_port = dst_port = 0; dst_ip.s_addr = src_ip.s_addr = 0; args->f_id.addr_type = 1; /* XXX */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901291118.x0TBIfdQ005808>