Bug #3272

DB key name clash in networks db

Added by Filippo Carletti about 4 years ago. Updated almost 4 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-firewall-base
Target version:v6.7
Security class:low Resolution:
Affected version:v6.6 NEEDINFO:No

Description

If you have a networks entry for, let's say, eth1 and create a Multi WAN provider named eth1, the networks database will contain both and things will broke.

Associated revisions

Revision 8dba02de
Added by Giovanni Bezicheri about 4 years ago

Avoid using an existing interface as provider's name. Refs #3272

Revision c0e774da
Added by Giacomo Sanchietti almost 4 years ago

Revert "Avoid using an existing interface as provider's name. Refs #3272"

This reverts commit 8dba02de20d39ce219d9e16038c1d142b5758986.

Revision e0f5ed8f
Added by Giacomo Sanchietti almost 4 years ago

Web UI: invoke network-create system validator. Refs #3272

Revision 2136a7ea
Added by Giacomo Sanchietti almost 4 years ago

Create new system-validator network-create. Refs #3272

History

#1 Updated by Filippo Carletti about 4 years ago

  • Target version set to v6.7

#2 Updated by Giovanni Bezicheri about 4 years ago

  • Status changed from NEW to TRIAGED
  • Assignee set to Giovanni Bezicheri
  • % Done changed from 0 to 20
  • Security class set to low

#3 Updated by Giovanni Bezicheri about 4 years ago

  • Status changed from TRIAGED to ON_DEV
  • % Done changed from 20 to 30

#4 Updated by Giovanni Bezicheri about 4 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#5 Updated by Giovanni Bezicheri about 4 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giovanni Bezicheri)
  • % Done changed from 60 to 70
Package in nethserver-testing:
  • nethserver-firewall-base-2.8.0-1.1.g8dba02d.ns6.noarch.rpm
  • nethserver-firewall-base-ui-2.8.0-1.1.g8dba02d.ns6.noarch.rpm

Check the bug is not reproducible.

#6 Updated by Giacomo Sanchietti about 4 years ago

  • Status changed from ON_QA to TRIAGED
  • % Done changed from 70 to 20

The web interface must use a validator to check if the key is already used inside the networks db.
Actual fix checks only records within a limited list of types.

Also the package has been deleted from 6.6/nethserver-testing: the fix must be only on 6.7 repository.

#7 Updated by Giacomo Sanchietti almost 4 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#8 Updated by Giacomo Sanchietti almost 4 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

Created new network.-create system validator: it checks if a key already exists.

#9 Updated by Giacomo Sanchietti almost 4 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Packages in nethserver-base:
  • nethserver-base-2.9.2-1.1.g2136a7e.ns6.noarch.rpm
  • nethserver-firewall-base-ui-2.8.0-1.6.ge0f5ed8.ns6.noarch.rpm
  • nethserver-firewall-base-2.8.0-1.6.ge0f5ed8.ns6.noarch.rpm
Test case 1
  • Try to create a provider with a name not present inside the networks db
  • The creation must be successful
Test case 2
  • Try to create a provider with a name already present inside the networks db (eg. 'ppp0')
  • The creation must fail

#10 Updated by dz0 0te almost 4 years ago

  • Assignee set to dz0 0te

#11 Updated by dz0 0te almost 4 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (dz0 0te)
  • % Done changed from 70 to 90

System and Package Version installed
VM KVM - Clean install of Nethserver 6.7 fully updated
Package Installed: nethserver-base-2.9.2-1.ns6.noarch
nethserver-firewall-base-2.8.0-1.ns6.noarch
nethserver-firewall-base-ui-2.8.0-1.ns6.noarch
Other Package installed: Basic firewall, Intrusion Prevention System

Test Original Problem
replicated bug (created a multiwan named eth2 when an eth2 interface is present)

Install Updated Package

yum --enablerepo=nethserver-testing update nethserver-base-2.9.2-1.1.g2136a7e.ns6.noarch nethserver-firewall-base-ui-2.8.0-1.6.ge0f5ed8.ns6.noarch nethserver-firewall-base-2.8.0-1.6.ge0f5ed8.ns6.noarch

Test Results after update
Test case 1:
creation of provider with a name not present in db - OK

Test Case 2:
creation with a name alreay present - failed - OK

Interface
The name `eth2` has been already used inside the networks database

Verified or Reopen
Verified

Note

#12 Updated by Giacomo Sanchietti almost 4 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
Released in nethserver-updates:
  • nethserver-base-2.9.3-1.ns6.noarch.rpm
  • nethserver-firewall-base-ui-2.9.0-1.ns6.noarch.rpm
  • nethserver-firewall-base-2.9.0-1.ns6.noarch.rpm

Also available in: Atom PDF