Skip to content

Commit

Permalink
Cherry-pick of 29438 to R3.1
Browse files Browse the repository at this point in the history
Fixing invalid message received in nh --get o/p

Skipping sub-nh expansion for composite nh case if the index is -1
in nh utility.

Change-Id: I2bb90d7b1ff16beb088f928ead3e4a6d84f5537d
Closes-Bug: #1670820
  • Loading branch information
ravi-bk committed Mar 21, 2017
1 parent 258b327 commit 7ce3dc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/nh.c
Expand Up @@ -292,6 +292,9 @@ vr_nexthop_req_process(void *s_req)
printf("\n\n");
if (req->nhr_type == NH_COMPOSITE && command == SANDESH_OP_GET) {
for (i = 0; i < req->nhr_nh_list_size; i++) {
// Skip expanding sub-nh for -1 index
if (req->nhr_nh_list[i] == -1)
continue;
vr_nh_op(cl, command, type, req->nhr_nh_list[i], if_id, vrf_id,
dst_mac, src_mac, sip, dip, flags);
}
Expand Down

0 comments on commit 7ce3dc7

Please sign in to comment.