Project

General

Profile

Actions

Bug #2649

closed

SyncLogicHandler does not check validity of SyncSocket before use

Added by Vince Lehman about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
03/16/2015
Due date:
% Done:

100%

Estimated time:

Description

Currently, a SyncSocket is not created until the router builds its first Adjacency LSA.
When the router refreshes its LSAs, it publishes a new routing update which uses the SyncSocket.

If the router refreshes its LSAs before it first builds an Adjacency LSA, SyncLogicHandler will try to use the SyncSocket pointer before an object is created resulting in a segfault.

The sync socket should be created on initialization to fix this issue.


Related issues 2 (0 open2 closed)

Related to NLSR - Bug #5009: Sync interest should be sent only after NLSR has registered routesClosedAshlesh Gawande

Actions
Blocks NLSR - Feature #1834: Runtime advertise and withdrawClosedVince Lehman

Actions
Actions #1

Updated by Junxiao Shi about 9 years ago

Why is the SyncSocket created only after the first Adjacency LSA is created?

Can we create it at initialization?

Actions #2

Updated by Alex Afanasyev almost 9 years ago

I got exactly the same question as Junxiao after trying to review http://gerrit.named-data.net/#/c/1879. Why do we have such an artifact? Creating sync socket doesn't seem to involve any communication operations (or does it?).

Actions #3

Updated by Vince Lehman almost 9 years ago

Yeah, I agree with both of you. I can't remember why this feature (creating the sync socket after the first Adjacency LSA) was requested in the first place.

I will look through my emails and the associated Redmine issues to see if there is an explanation.

Actions #4

Updated by Vince Lehman almost 9 years ago

  • Description updated (diff)

I can't find any reason why the sync socket can't be created on initialization.

At the worst, a recovering router might receive sync updates for its own outdated LSAs, but there are checks in the code to prevent a router from trying to fetch its own LSAs.

Actions #5

Updated by Vince Lehman almost 9 years ago

Actions #6

Updated by Lan Wang almost 9 years ago

Then can you modify the code to create the syncsocket at the beginning?

Actions #7

Updated by Vince Lehman almost 9 years ago

Lan Wang wrote:

Then can you modify the code to create the syncsocket at the beginning?

Yes, I will push an updated patch shortly.

Actions #8

Updated by Vince Lehman almost 9 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 0 to 90
Actions #9

Updated by Vince Lehman almost 9 years ago

  • Status changed from Code review to Closed
  • % Done changed from 90 to 100
Actions #10

Updated by Ashlesh Gawande over 4 years ago

  • Related to Bug #5009: Sync interest should be sent only after NLSR has registered routes added
Actions

Also available in: Atom PDF