diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-08-23 07:05:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-08-23 07:05:36 +0000 |
commit | 3f709888ef31c008021f2e929a937a3d6b312c87 (patch) | |
tree | b097dd27250417672022117a219560a8b984a32f /hicn-light/src/hicn/processor/messageProcessor.c | |
parent | 33eca8c68b581038f225fac7f75b398298341935 (diff) | |
parent | 707a14c46b1a5ba66e1abf7f7a9f0aed16f67501 (diff) |
Merge "HICN-266 fix strategy creation with policies"
Diffstat (limited to 'hicn-light/src/hicn/processor/messageProcessor.c')
-rw-r--r-- | hicn-light/src/hicn/processor/messageProcessor.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/hicn-light/src/hicn/processor/messageProcessor.c b/hicn-light/src/hicn/processor/messageProcessor.c index 7e0ece257..420863e26 100644 --- a/hicn-light/src/hicn/processor/messageProcessor.c +++ b/hicn-light/src/hicn/processor/messageProcessor.c @@ -34,9 +34,7 @@ #include <hicn/content_store/contentStoreLRU.h> #include <hicn/strategies/loadBalancer.h> -#ifndef WITH_POLICY #include <hicn/strategies/loadBalancerWithPD.h> -#endif /* ! WITH_POLICY */ #include <hicn/strategies/rnd.h> #include <hicn/strategies/rndSegment.h> #include <hicn/strategies/strategyImpl.h> @@ -311,16 +309,14 @@ bool messageProcessor_AddOrUpdateRoute(MessageProcessor *processor, Name *prefix = name_CreateFromAddress(control->addressType, control->address, control->len); FibEntry *entry = fib_Contains(processor->fib, prefix); -#ifndef WITH_POLICY bool newEntry = false; -#endif /* ! WITH_POLICY */ if (entry != NULL) { fibEntry_AddNexthop(entry, ifidx); } else { + newEntry = true; #ifdef WITH_POLICY entry = fibEntry_Create(prefix, fwdStrategy, processor->forwarder); #else - newEntry = true; entry = fibEntry_Create(prefix, fwdStrategy); #endif /* WITH_POLICY */ fibEntry_AddNexthop(entry, ifidx); @@ -329,7 +325,6 @@ bool messageProcessor_AddOrUpdateRoute(MessageProcessor *processor, name_Release(&prefix); -#ifndef WITH_POLICY /* For policy implementation, we need access to the ConnectionTable in all * Forwarding Strategies, so it is setup during FIB Entry creation */ if (newEntry && (fwdStrategy == SET_STRATEGY_LOADBALANCER_WITH_DELAY)) { @@ -337,7 +332,6 @@ bool messageProcessor_AddOrUpdateRoute(MessageProcessor *processor, fibEntry_GetFwdStrategy(entry), forwarder_GetConnectionTable(processor->forwarder)); } -#endif /* ! WITH_POLICY */ return true; } |