Skip to content

Commit 1cc6663

Browse files
committed
lib: fix incorrect comment re. ZAPI encoding
The comment was incorrectly stating that there's a byte length field after the address, with an example "4" for IPv4. It's a prefix length field. Also add it for the destination prefix. Signed-off-by: David 'equinox' Lamparter <equinox@opensourcerouting.org>
1 parent 58a193e commit 1cc6663

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/zclient.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3185,12 +3185,14 @@ size_t zebra_interface_link_params_write(struct stream *s,
31853185
* : :
31863186
* | |
31873187
* +-+-+-+-+-+-+-+-+
3188-
* | addr_len | len of addr. E.g., addr_len = 4 for ipv4 addrs.
3188+
* | addr_plen | prefixlen of addr.
31893189
* +-+-+-+-+-+-+-+-+
3190-
* | daddr.. |
3190+
* | daddr.. | (zeroes if no destination/peer prefix)
31913191
* : :
31923192
* | |
31933193
* +-+-+-+-+-+-+-+-+
3194+
* | daddr_plen | prefixlen of daddr.
3195+
* +-+-+-+-+-+-+-+-+
31943196
*/
31953197

31963198
static int memconstant(const void *s, int c, size_t n)

0 commit comments

Comments
 (0)