Skip to content

Commit

Permalink
mod_sonic portGetAdaptor() revert to lookup by osIndex only
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Jun 5, 2024
1 parent c4a107f commit c5e9ec5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hsflowd.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Summary: host sFlow daemon
Name: hsflowd
Version: 2.1.04
Release: 5
Release: 6
License: http://sflow.net/license.html
Group: Applications/Internet
URL: http://sflow.net
Expand Down
12 changes: 6 additions & 6 deletions src/Linux/mod_sonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,13 @@ extern "C" {

static SFLAdaptor *portGetAdaptor(EVMod *mod, HSPSonicPort *prt) {
HSP *sp = (HSP *)EVROOTDATA(mod);
//if(prt->osIndex == HSP_SONIC_IFINDEX_UNDEFINED)
// return NULL;
if(prt->osIndex == HSP_SONIC_IFINDEX_UNDEFINED)
return NULL;
SFLAdaptor *adaptor = adaptorByIndex(sp, prt->osIndex);
if(adaptor == NULL)
adaptor = adaptorByName(sp, prt->portName);
if(adaptor == NULL)
adaptor = adaptorByAlias(sp, prt->portName);
//if(adaptor == NULL)
// adaptor = adaptorByName(sp, prt->portName);
//if(adaptor == NULL)
// adaptor = adaptorByAlias(sp, prt->portName);
return adaptor;
}

Expand Down

0 comments on commit c5e9ec5

Please sign in to comment.