1. 04 5月, 2018 1 次提交
    • D
      nwfilter: remove pointless virNWFilterHashTable struct · 77646d94
      Daniel P. Berrangé 提交于
      The virNWFilterHashTable struct only contains a single virHashTable
      member since
      
        commit 293d4fe2
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Mon Mar 24 16:35:23 2014 +0000
      
          Remove pointless storage of var names in virNWFilterHashTable
      
      Thus, this struct wrapper adds no real value over just using the
      virHashTable directly, but brings the complexity of needing to derefence
      the hashtable to call virHash* APIs, and adds extra memory allocation
      step.
      
      To minimize code churn this just turns virNWFilterHashTable into a
      typedef aliases virHashTable.
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      77646d94
  2. 02 10月, 2017 2 次提交
    • J
      nwfilter: Don't have virNWFilterIPAddrMapAddIPAddr consume input · a55eaced
      John Ferlan 提交于
      On pure success paths, virNWFilterIPAddrMapAddIPAddr was validly
      consuming the input @addr; however, on failure paths it was possible
      that virNWFilterVarValueCreateSimple succeed, but virNWFilterHashTablePut
      failed resulting in virNWFilterVarValueFree being called to clean
      up @val which also cleaned up the input @addr. Thus the caller had
      no way to determine on failure whether it too should clean up the
      passed parameter.
      
      Instead, let's create a copy of the input @addr, then handle that
      properly in the API allowing/forcing the caller to free it's own
      copy of the input parameter.
      a55eaced
    • J
      Revert "nwfilter: Fix possible segfault on sometimes consumed variable" · 03970217
      John Ferlan 提交于
      This reverts commit 6209bb32.
      
      This turns out to be the wrong adjustment
      03970217
  3. 28 9月, 2017 1 次提交
    • J
      nwfilter: Fix possible segfault on sometimes consumed variable · 6209bb32
      John Ferlan 提交于
      The virNWFilterIPAddrMapAddIPAddr code can consume the @addr parameter
      on success when the @ifname is found in the ipAddressMap->hashTable
      hash table in the call to virNWFilterVarValueAddValue; however, if
      not found in the hash table, then @addr is formatted into a @val
      which is stored in the table and on return the caller would be
      expected to free @addr.
      
      Thus, the caller has no way to determine on success whether @addr was
      consumed, so in order to fix this create a @tmp variable which will
      be stored/consumed when virNWFilterVarValueAddValue succeeds. That way
      the caller can free @addr whether the function returns success or failure.
      6209bb32
  4. 27 9月, 2017 1 次提交
  5. 25 4月, 2014 1 次提交
  6. 08 4月, 2014 1 次提交
  7. 25 3月, 2014 1 次提交
  8. 10 7月, 2013 1 次提交
  9. 21 12月, 2012 1 次提交
  10. 21 9月, 2012 1 次提交
  11. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  12. 02 6月, 2012 1 次提交
    • S
      nwfilter: move code for IP address map into separate file · 797b4758
      Stefan Berger 提交于
      The goal of this patch is to prepare for support for multiple IP
      addresses per interface in the DHCP snooping code.
      
      Move the code for the IP address map that maps interface names to
      IP addresses into their own file. Rename the functions on the way
      but otherwise leave the code as-is. Initialize this new layer
      separately before dependent layers (iplearning, dhcpsnooping)
      and shut it down after them.
      797b4758