Skip to content

Commit f66cd41

Browse files
Reed MorrisonFelipe Zimmerle
authored andcommitted
Fix ip tree lookup on netmask content
1 parent 71f650a commit f66cd41

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
DD MMM YYYY - 2.9.3 - To be released
22
------------------------------------
33

4+
* Fix ip tree lookup on netmask content
5+
[Issue #1793 - @tinselcity, @zimmerle]
46
* IIS: set overrideModeDefault to Allow so that individual websites can
57
add <ModSecurity ...> to their web.config file
68
[Issue #1781 - @default-kramer]

apache2/msc_tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ TreeNode *CPTFindElement(modsec_rec *msr, unsigned char *ipdata, unsigned int ip
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)