Legitimate for same MAC to be in two VLANs on same switchport

This commit is contained in:
Oliver Gorwits
2014-04-19 21:41:43 +01:00
parent 30bc957edf
commit 3edef4719d
2 changed files with 2 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
* Search for localenv could not find $HOME * Search for localenv could not find $HOME
* Fixes to allow output of get_init_file to be used as init script * Fixes to allow output of get_init_file to be used as init script
* Legitimate for same MAC to be in two VLANs on same switchport
2.025001 - 2014-04-08 2.025001 - 2014-04-08

View File

@@ -151,14 +151,13 @@ sub store_node {
schema('netdisco')->txn_do(sub { schema('netdisco')->txn_do(sub {
my $nodes = schema('netdisco')->resultset('Node'); my $nodes = schema('netdisco')->resultset('Node');
# TODO: probably needs changing if we're to support VTP domains
my $old = $nodes->search( my $old = $nodes->search(
{ mac => $mac, { mac => $mac,
vlan => $vlan,
-bool => 'active', -bool => 'active',
-not => { -not => {
switch => $ip, switch => $ip,
port => $port, port => $port,
vlan => $vlan,
}, },
})->update( { active => \'false' } ); })->update( { active => \'false' } );