diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2018-10-23 12:31:25 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2018-10-23 12:31:25 +0200 |
| commit | 064518517c57024e65e177ee79c0a98f9f28ef6e (patch) | |
| tree | dcc1d14ad647a210ef2d93da4fe827d9337ada4b /ospf6d/ospf6_neighbor.c | |
| parent | 920b243c1b154476ab9a629ac002817ead5a1efa (diff) | |
| parent | d17743d390757c170bad6a776de43d1809afe3c3 (diff) | |
Merge branch 'pull/3197'
...with a nit fix
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ospf6d/ospf6_neighbor.c')
| -rw-r--r-- | ospf6d/ospf6_neighbor.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 4c24f47131..bb451c239e 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -59,7 +59,11 @@ int ospf6_neighbor_cmp(void *va, void *vb) { struct ospf6_neighbor *ona = (struct ospf6_neighbor *)va; struct ospf6_neighbor *onb = (struct ospf6_neighbor *)vb; - return (ntohl(ona->router_id) < ntohl(onb->router_id) ? -1 : 1); + + if (ona->router_id == onb->router_id) + return 0; + + return (ntohl(ona->router_id) < ntohl(onb->router_id)) ? -1 : 1; } struct ospf6_neighbor *ospf6_neighbor_lookup(uint32_t router_id, |
