From owner-svn-src-head@freebsd.org Thu Apr 14 21:52:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C126AEC7F4; Thu, 14 Apr 2016 21:52:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BDEA12E3; Thu, 14 Apr 2016 21:52:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3ELqVOK054823; Thu, 14 Apr 2016 21:52:31 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3ELqVqH054821; Thu, 14 Apr 2016 21:52:31 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201604142152.u3ELqVqH054821@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 Apr 2016 21:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298003 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 21:52:32 -0000 Author: ae Date: Thu Apr 14 21:52:31 2016 New Revision: 298003 URL: https://svnweb.freebsd.org/changeset/base/298003 Log: Change the type of 'etlv' field in struct named_object to uint16_t. It should match with the type field in struct ipfw_obj_tlv. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Thu Apr 14 21:47:58 2016 (r298002) +++ head/sys/netpfil/ipfw/ip_fw_private.h Thu Apr 14 21:52:31 2016 (r298003) @@ -313,9 +313,9 @@ struct named_object { TAILQ_ENTRY(named_object) nn_next; /* namehash */ TAILQ_ENTRY(named_object) nv_next; /* valuehash */ char *name; /* object name */ - uint8_t subtype; /* object subtype within class */ - uint8_t etlv; /* Export TLV id */ - uint16_t spare[2]; + uint16_t etlv; /* Export TLV id */ + uint8_t subtype;/* object subtype within class */ + uint8_t spare[3]; uint16_t kidx; /* object kernel index */ uint32_t set; /* set object belongs to */ uint32_t refcnt; /* number of references */ Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Apr 14 21:47:58 2016 (r298002) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Apr 14 21:52:31 2016 (r298003) @@ -4063,7 +4063,8 @@ ipfw_objhash_lookup_name_type(struct nam hash = ni->hash_f(ni, name, set) % ni->nn_size; TAILQ_FOREACH(no, &ni->names[hash], nn_next) { - if (ni->cmp_f(no, name, set) == 0 && no->etlv == type) + if (ni->cmp_f(no, name, set) == 0 && + no->etlv == (uint16_t)type) return (no); }