Project

General

Profile

Bug #5179

Updated by Ashlesh Gawande over 2 years ago

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 add 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.

Back