]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
rose: fix CHECK_MULTIPATH_LOOKAROUND match difference bug
authorXu, Chi <chi.xu@intel.com>
Wed, 5 Apr 2017 20:20:17 +0000 (04:20 +0800)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 05:19:49 +0000 (15:19 +1000)
src/rose/program_runtime.h

index 88c312d2dc2121f210679348276749950502a0e2..10a87c8b27249b78a6779cc013fd4e175bba5def 100644 (file)
@@ -1192,9 +1192,10 @@ int roseMultipathLookaround(const struct RoseEngine *t,
         return 0;
     }
 
-    u32 start_offset = 0;
+    s8 base_look_offset = *look;
     do {
         s64a offset = base_offset + *look;
+        u32 start_offset = (u32)(*look - base_look_offset);
         DEBUG_PRINTF("start_mask[%u] = %x\n", start_offset,
                      start_mask[start_offset]);
         path = start_mask[start_offset];
@@ -1202,7 +1203,6 @@ int roseMultipathLookaround(const struct RoseEngine *t,
             break;
         }
         DEBUG_PRINTF("look=%d before history\n", *look);
-        start_offset++;
         look++;
         reach += MULTI_REACH_BITVECTOR_LEN;
     } while (look < look_end);