aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAkshayaNadahalli <anadahal@cisco.com>2017-03-27 17:21:05 +0000
committerNeale Ranns <nranns@cisco.com>2017-03-27 19:26:15 +0000
commit98ab09159ab0a117850c1ebbcc3c83b9bbde64ec (patch)
treea372c502303d0aa96b2323c6613c78176c4f85b8 /src
parentafaa85f873a7bff1cf1e32c22f909af3018ccfee (diff)
Fix output feature processing (VPP-670)
Addressed comments. Change-Id: Ic7d863ea4126f5046986b661db45d26bcce2068f Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/adj/adj_nbr.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/vnet/adj/adj_nbr.c b/src/vnet/adj/adj_nbr.c
index 61b5c83053b..072abd0300d 100644
--- a/src/vnet/adj/adj_nbr.c
+++ b/src/vnet/adj/adj_nbr.c
@@ -162,13 +162,12 @@ adj_nbr_evaluate_feature (adj_index_t ai)
}
sw_if_index = adj->rewrite_header.sw_if_index;
- vec_validate (fm->feature_count_by_sw_if_index[arc_index], sw_if_index);
- feature_count = fm->feature_count_by_sw_if_index[arc_index][sw_if_index];
-
- if (feature_count > 0)
- adj->rewrite_header.flags |= VNET_REWRITE_HAS_FEATURES;
- else
- adj->rewrite_header.flags &= ~VNET_REWRITE_HAS_FEATURES;
+ if (vec_len(fm->feature_count_by_sw_if_index[arc_index]) > sw_if_index)
+ {
+ feature_count = fm->feature_count_by_sw_if_index[arc_index][sw_if_index];
+ if (feature_count > 0)
+ adj->rewrite_header.flags |= VNET_REWRITE_HAS_FEATURES;
+ }
return;
}