Skip to content

Commit

Permalink
adjust priorities for agent address selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Nov 21, 2022
1 parent 7f233a1 commit 458295b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 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.0.39
Release: 8
Release: 9
License: http://sflow.net/license.html
Group: Applications/Internet
URL: http://sflow.net
Expand Down
6 changes: 6 additions & 0 deletions src/Linux/hsflowconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,9 @@ extern "C" {
else if(SFLAddress_isClassE(addr)) {
ipPriority = IPSP_CLASS_E;
}
else if(SFLAddress_isMulticast(addr)) {
ipPriority = IPSP_MULTICAST;
}
break;

case SFLADDRESSTYPE_IP_V6:
Expand All @@ -1038,6 +1041,9 @@ extern "C" {
else if(vlan != HSP_VLAN_ALL) {
ipPriority = IPSP_VLAN6;
}
else if(SFLAddress_isMulticast(addr)) {
ipPriority = IPSP_MULTICAST;
}
break;
default:
// not a v4 or v6 ip address at all
Expand Down
4 changes: 2 additions & 2 deletions src/Linux/hsflowd.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ extern "C" {
} HSPVMState;

typedef enum { IPSP_NONE=0,
IPSP_CLASS_E,
IPSP_MULTICAST,
IPSP_LOOPBACK6,
IPSP_LOOPBACK4,
IPSP_SELFASSIGNED4,
Expand All @@ -262,8 +264,6 @@ extern "C" {
IPSP_IP6_SCOPE_GLOBAL,
IPSP_IP4_RFC1918,
IPSP_IP4,
IPSP_CLASS_E,
IPSP_MULTICAST,
IPSP_NUM_PRIORITIES,
} EnumIPSelectionPriority;

Expand Down

0 comments on commit 458295b

Please sign in to comment.