]> Kevux Git Server - fll/commitdiff
Bugfix: Fix usage of rule_contents for protocol none option
authorKevin Day <kevin@kevux.org>
Sun, 10 Jun 2012 18:31:20 +0000 (13:31 -0500)
committerKevin Day <kevin@kevux.org>
Sun, 10 Jun 2012 18:31:20 +0000 (13:31 -0500)
The if condition that is checking for the existing of the protocol option 'none' was improperly setup.
It was using the rule_objects instead of the rule_contents and therefore would never validate.

level_3/firewall/c/private-firewall.c

index d142ef5e97d7747801d92887dda1f3945ddfcf95..be151d699e2b105a20796950d91f3368e9a96f5f 100644 (file)
 
           if (f_error_is_error(status)) break;
 
-          if (fl_compare_strings(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_protocol_none, length, firewall_protocol_none_length) == f_equal_to) {
+          if (fl_compare_strings(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_protocol_none, length, firewall_protocol_none_length) == f_equal_to) {
             use_protocol = f_false;
           } else {
             strncat(protocol.string, local.buffer.string + local.rule_contents.array[i].array[0].start, length);