zebra: change router-id selection algo

The router-id table looks like is supposed to be sorted in current
quagga code, but the nodes are not added with the sorting
function.

The sorting function is host byte order dependent.
The values need to converted before comparison.

Fixing this causes Zebra to choose the largest IP address
as router-id, rather than the last address. This probably will
surprise some users. The other option would be to just remove the
comparison function and keep the existing LIFO behavior.

Lastly, simple subtraction works well for comparing.

* zebra/router-id.c
  * router_id_add_address(): employ listnode_add_sort()
  * router_id_cmp(): employ ntohl(), then compare integers
1 file changed