Project

General

Profile

Actions

Bug #5179

closed

Nlsr unregisters route for router that advertised it initially

Added by Ashlesh Gawande over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

To reproduce in Mini-NDN with attached topology:

mini-ndn> wu nlsrc advertise /test
Applied Name prefix update successfully: (Advertise: /test)
mini-ndn> neu nfdc fib | grep test
  /test nexthops={faceid=268 (cost=28), faceid=266 (cost=38), faceid=271 (cost=44)}
mini-ndn> memphis nlsrc advertise /test
Applied Name prefix update successfully: (Advertise: /test)
mini-ndn> neu nfdc fib | grep test
  /test nexthops={faceid=266 (cost=21), faceid=268 (cost=26), faceid=271 (cost=42)}

Withdraw prefix:

mini-ndn> memphis nlsrc withdraw /test
Applied Name prefix update successfully: (Withdraw: /test)

Expected (the same as when Wu first advertised):

mini-ndn> neu nfdc fib | grep test
  /test nexthops={faceid=268 (cost=28), faceid=266 (cost=38), faceid=271 (cost=44)}

Actual:

mini-ndn> neu nfdc fib | grep test
mini-ndn>

The reason is that we are sorting NexthopList by cost and not by Uri.
Fib update function first adds all the hops given to it by NamePrefixTable.
Then it determines what hops to remove by doing a set_difference.
The set_difference is done as: existing set (from previous registration that Fib keeps track of) - prefixes added now.
Here the hops are the same (faceUri wise) but different in cost (which is what is used as comparison function).
So we result with hops needed to be removed same as what were added (since the costs are different between each hop):

1629571482.808390 DEBUG: [nlsr.route.Fib] Adding udp4://10.0.0.13:6363 to /test
1629571482.808438 DEBUG: [nlsr.route.Fib] Registering prefix: /test faceUri: udp4://10.0.0.13:6363
1629571482.808657 DEBUG: [nlsr.route.Fib] Adding udp4://10.0.0.9:6363 to /test
1629571482.808685 DEBUG: [nlsr.route.Fib] Registering prefix: /test faceUri: udp4://10.0.0.9:6363
1629571482.808832 DEBUG: [nlsr.route.Fib] Adding udp4://10.0.0.26:6363 to /test
1629571482.808859 DEBUG: [nlsr.route.Fib] Registering prefix: /test faceUri: udp4://10.0.0.26:6363
1629571482.809013 DEBUG: [nlsr.route.Fib] Unregister prefix: /test Face Uri: udp4://10.0.0.9:6363
1629571482.809153 DEBUG: [nlsr.route.Fib] Removing udp4://10.0.0.9:6363 from /test
1629571482.809179 DEBUG: [nlsr.route.Fib] Unregister prefix: /test Face Uri: udp4://10.0.0.13:6363
1629571482.809307 DEBUG: [nlsr.route.Fib] Removing udp4://10.0.0.13:6363 from /test
1629571482.809332 DEBUG: [nlsr.route.Fib] Unregister prefix: /test Face Uri: udp4://10.0.0.26:6363
1629571482.809506 DEBUG: [nlsr.route.Fib] Removing udp4://10.0.0.26:6363 from /test

We should just compare on faceUris here.


Files

testbed2021-08-21.conf (468 Bytes) testbed2021-08-21.conf Ashlesh Gawande, 08/22/2021 12:09 PM
Actions #1

Updated by Ashlesh Gawande over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Ashlesh Gawande over 2 years ago

  • Description updated (diff)
Actions #4

Updated by Ashlesh Gawande over 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF