ospfd: trap on state change seems to send incorrect value for ospfNbrState

The ospfNbrState in the ospf trap sent from ospfd shows an incorrect state.

For example, when the connection goes down, the ospfNbrState in the trap is
sent as '8' (full).  When the connection is reestablished, the state is sent
as '7' (loading).

The reason seems to be that the trap is sent from nsm_notice_state_change()
before the state is actually updated by calling nsm_change_state().

After applying the attached patch, the traps are sent with nbrState '1' when
the connection goes down and '8' when it goes back up.

Bugzilla #833 https://bugzilla.quagga.net/show_bug.cgi?id=833
1 file changed