olsr_switch: replace random() by our own function