]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: Fix vrf_id_t data type
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 May 2016 23:52:10 +0000 (19:52 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 26 May 2016 23:52:10 +0000 (19:52 -0400)
We were reading a u_int16_t for vrf_id_t.  While technically
the same thing, I'd like to make sure we think about vrf_id_t's
as vrf_id_t's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/zclient.c
lib/zclient.h
pimd/pim_zlookup.c

index 850639f321224fec5d91072755d31e67d8032d5a..9f426f1cacf5b35b89f54fb253f133a9fcb42ee3 100644 (file)
@@ -336,7 +336,7 @@ zclient_create_header (struct stream *s, uint16_t command, vrf_id_t vrf_id)
 
 int
 zclient_read_header (struct stream *s, int sock, u_int16_t *size, u_char *marker,
-                     u_char *version, u_int16_t *vrf_id, u_int16_t *cmd)
+                     u_char *version, vrf_id_t *vrf_id, u_int16_t *cmd)
 {
   if (stream_read (s, sock, ZEBRA_HEADER_SIZE) != ZEBRA_HEADER_SIZE)
     return -1;
index 0940e23a28c11b7aee2cb83a0eef43f52e5274bc..6bb1725963e86e0a69a8fb504c139751a2db4554 100644 (file)
@@ -198,7 +198,7 @@ extern int zclient_send_message(struct zclient *);
 extern void zclient_create_header (struct stream *, uint16_t, vrf_id_t);
 extern int zclient_read_header (struct stream *s, int sock, u_int16_t *size,
                                u_char *marker, u_char *version,
-                               u_int16_t *vrf_id, u_int16_t *cmd);
+                               vrf_id_t *vrf_id, u_int16_t *cmd);
 
 extern struct interface *zebra_interface_add_read (struct stream *, vrf_id_t);
 extern struct interface *zebra_interface_state_read (struct stream *s, vrf_id_t);
index 0ca3da20a040a5f658c5ad187942cba0ceaba9c3..bec625ab56bbd88cbaec3bdc47bb517fe5be6e6c 100644 (file)
@@ -153,7 +153,7 @@ static int zclient_read_nexthop(struct zclient *zlookup,
   uint16_t length;
   u_char marker;
   u_char version;
-  uint16_t vrf_id;
+  vrf_id_t vrf_id;
   uint16_t command;
   struct in_addr raddr;
   uint8_t distance;
@@ -173,7 +173,7 @@ static int zclient_read_nexthop(struct zclient *zlookup,
   stream_reset(s);
 
   err = zclient_read_header (s, zlookup->sock, &length, &marker, &version,
-                             &vrf_id, &command);
+                            &vrf_id, &command);
   if (err < 0) {
     zlog_err("%s %s: zclient_read_header() failed",
             __FILE__, __PRETTY_FUNCTION__);