]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripd: fix list compare order
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 23 Oct 2018 10:30:00 +0000 (12:30 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 23 Oct 2018 10:30:00 +0000 (12:30 +0200)
As noted in review comment by @rwestphal

Signed-off-by: David Lamparter <equinox@diac24.net>
ripd/rip_peer.c

index 548dab9c01c70f77a87e31c4f1237af42c5d380d..21317915d42613853a489112a18684b018c12f62 100644 (file)
@@ -175,7 +175,7 @@ static int rip_peer_list_cmp(struct rip_peer *p1, struct rip_peer *p2)
        if (p2->addr.s_addr == p1->addr.s_addr)
                return 0;
 
-       return (htonl(p2->addr.s_addr) < htonl(p1->addr.s_addr)) ? -1 : 1;
+       return (htonl(p1->addr.s_addr) < htonl(p2->addr.s_addr)) ? -1 : 1;
 }
 
 void rip_peer_init(void)