Skip to content

Commit

Permalink
Clean the mac address before deregistering
Browse files Browse the repository at this point in the history
Fixes #8498
  • Loading branch information
jrouzierinverse committed Jan 27, 2025
1 parent 0283e62 commit 2197c60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pf/node.pm
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,12 @@ sub node_deregister {
my ($mac, %info) = @_;
my $logger = get_logger();
$pf::StatsD::statsd->increment( called() . ".called" );
my $cleaned_mac = clean_mac($mac);
if (!$cleaned_mac) {
$logger->error("unable to de-register node $mac invalid mac");
}

$mac = $cleaned_mac;
$info{'status'} = 'unreg';
$info{'regdate'} = $ZERO_DATE;
$info{'unregdate'} = $ZERO_DATE;
Expand Down

0 comments on commit 2197c60

Please sign in to comment.