Merge pull request #1811 from donaldsharp/nht_send_type

lib, zebra: Add type and instance to nexthop update message
This commit is contained in:
Renato Westphal 2018-03-06 13:48:40 -03:00 committed by GitHub
commit defd0965f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -1266,6 +1266,8 @@ bool zapi_nexthop_update_decode(struct stream *s, struct zapi_route *nhr)
break;
}
STREAM_GETC(s, nhr->type);
STREAM_GETW(s, nhr->instance);
STREAM_GETC(s, nhr->distance);
STREAM_GETL(s, nhr->metric);
STREAM_GETC(s, nhr->nexthop_num);

View File

@ -1019,6 +1019,8 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
break;
}
if (re) {
stream_putc(s, re->type);
stream_putw(s, re->instance);
stream_putc(s, re->distance);
stream_putl(s, re->metric);
num = 0;
@ -1054,6 +1056,8 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
}
stream_putc_at(s, nump, num);
} else {
stream_putc(s, 0); // type
stream_putw(s, 0); // instance
stream_putc(s, 0); // distance
stream_putl(s, 0); // metric
stream_putc(s, 0); // nexthops