Skip to content

Commit

Permalink
Fixing invalid message received in nh --get o/p
Browse files Browse the repository at this point in the history
Skipping sub-nh expansion for composite nh case if the index is -1
in nh utility.

Change-Id: If6ef6424a67f96478d8cb740479728754b0d431f
Closes-Bug: #1670820
  • Loading branch information
ravi-bk committed Mar 8, 2017
1 parent 4275fee commit 3a0faa6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/nh.c
Expand Up @@ -372,6 +372,9 @@ vr_nexthop_req_process(void *s_req)
if (command == SANDESH_OP_GET) {
if (req->nhr_type == NH_COMPOSITE) {
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 3a0faa6

Please sign in to comment.