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 */ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"