Skip to content

Commit

Permalink
ospfd: set O-bit in the option of all DD packets
Browse files Browse the repository at this point in the history
If opaque-capability is enabled, we must set the O-bit in
the option field of all DD packets. Changing the option
field of DD packets may cause the peer to reset the state
back to ExStart.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
  • Loading branch information
feng-lu authored and eqvinox committed Feb 6, 2015
1 parent cb4fc59 commit 86ce951
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions ospfd/ospf_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -3143,22 +3143,7 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
options = OPTIONS (oi);
#ifdef HAVE_OPAQUE_LSA
if (CHECK_FLAG (oi->ospf->config, OSPF_OPAQUE_CAPABLE))
{
if (IS_SET_DD_I (nbr->dd_flags)
|| CHECK_FLAG (nbr->options, OSPF_OPTION_O))
/*
* Set O-bit in the outgoing DD packet for capablity negotiation,
* if one of following case is applicable.
*
* 1) WaitTimer expiration event triggered the neighbor state to
* change to Exstart, but no (valid) DD packet has received
* from the neighbor yet.
*
* 2) At least one DD packet with O-bit on has received from the
* neighbor.
*/
SET_FLAG (options, OSPF_OPTION_O);
}
SET_FLAG (options, OSPF_OPTION_O);
#endif /* HAVE_OPAQUE_LSA */
stream_putc (s, options);

Expand Down

0 comments on commit 86ce951

Please sign in to comment.