Skip to content

Commit 95048d5

Browse files
Reed MorrisonFelipe Zimmerle
Reed Morrison
authored and
Felipe Zimmerle
committed
Fix ip tree lookup on netmask content
1 parent 202a15b commit 95048d5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.0.3 - YYYY-MMM-DD (to be released)
22
-------------------------------------
33

4+
- Fix ip tree lookup on netmask content
5+
[Issue #1793 - @tinselcity, @zimmerle]
46
- Changes the behavior of the default sec actions
57
[Issue #1629 - @mirkodziadzka-avi, @zimmerle, @victorhora]
68
- Refactoring on {global,ip,resources,session,tx,user} collections

src/utils/msc_tree.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ TreeNode *CPTFindElement(unsigned char *ipdata, unsigned int ip_bitmask, CPTTree
755755
return node;
756756
}
757757

758-
if (memcmp(node->prefix->buffer, temp_data, bytes) == 0) {
758+
if ((node->netmasks == NULL) && memcmp(node->prefix->buffer, temp_data, bytes) == 0) {
759759
mask = SHIFT_LEFT_MASK(8 - ip_bitmask % 8);
760760

761761
if ((ip_bitmask % 8) == 0) {

0 commit comments

Comments
 (0)