]> git.proxmox.com Git - mirror_frr.git/blobdiff - ripngd/ripng_peer.c
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / ripngd / ripng_peer.c
index 2a412f9b646d3176a265b7549e50a902cb9ecb4b..6b2a18353924921b6548a9ca877d567f1ef0c65e 100644 (file)
@@ -113,7 +113,7 @@ static struct ripng_peer *ripng_peer_get(struct in6_addr *addr)
        return peer;
 }
 
-void ripng_peer_update(struct sockaddr_in6 *from, u_char version)
+void ripng_peer_update(struct sockaddr_in6 *from, uint8_t version)
 {
        struct ripng_peer *peer;
        peer = ripng_peer_get(&from->sin6_addr);
@@ -151,10 +151,6 @@ static char *ripng_peer_uptime(struct ripng_peer *peer, char *buf, size_t len)
        uptime -= peer->uptime;
        tm = gmtime(&uptime);
 
-/* Making formatted timer strings. */
-#define ONE_DAY_SECOND 60*60*24
-#define ONE_WEEK_SECOND 60*60*24*7
-
        if (uptime < ONE_DAY_SECOND)
                snprintf(buf, len, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min,
                         tm->tm_sec);
@@ -184,7 +180,7 @@ void ripng_peer_display(struct vty *vty)
 
 static int ripng_peer_list_cmp(struct ripng_peer *p1, struct ripng_peer *p2)
 {
-       return addr6_cmp(&p1->addr, &p2->addr) > 0;
+       return memcmp(&p1->addr, &p2->addr, sizeof(struct in6_addr));
 }
 
 void ripng_peer_init()