I think there is a bug in OLSR::degree()
method:
This method calculates the number of symmetric neighbors of node y, EXCLUDING all the members of N.
I think
OLSR_nb_tuple* nb_tuple =
state_.find_nb_tuple(nb2hop_tuple->nb_main_addr());
should be
OLSR_nb_tuple* nb_tuple =
state_.find_nb_tuple(nb2hop_tuple->2_hop_addr());
Am I right?