nasa-jpl / ION-DTN

NASA Open Source ION Software implementation of Delay Tolerant Networking. ION development is managed by the Jet Propulsion Lab; regression testing and code management are provided by Ohio University.
https://nasa-jpl.github.io/ION-DTN/
Other
23 stars 6 forks source link

SF: ipnfw ipn_lookupOvrd arguments reversed #9

Open iondev33 opened 9 months ago

iondev33 commented 9 months ago

in bpv7/ipn/ipnfw.c inside the applyRoutingOverride, bindOverride, and main functions, the arguments in the call to ipn_lookupOvrd are not in the the correct order. Argument list SHOULD be dataLabel, destNodeNbr, srcNodeNum, addr, rather than what is currently being used (dataLabel, srcNodeNbr, destNodeNbr, addr).

This bug results in routing overrides not being properly applied. If there are ipn override tests passing, it's likely because the source and destination are also swapped in the ipnadmin configurations.

The easiest fix would just be to use the correct order of arguments. A better (in my opinion) but more time consuming fix would be to make IPN overrides universally have the order dataLabel, srcNodeNbr, destNodeNbr as that seems less likely to produce bugs like this in the future. May not be worth the effort though.

-John