[riot-notifications] [RIOT] fib: repaired prefix/default gateway handling and added two according unittests (#3233)

Martine Lenders notifications at github.com
Wed Jun 24 00:00:33 CEST 2015


> 1) Why is ng_ndp passing NULL to fib_get_next_hop? => @authmillenon ?

@cgundogan looks like an error to me :-). Good catch. The more interesting question is: How should I handle this? It's far more efficient in this function for `next_hop_ip` to be a pointer (I don't want to use memcpy for all the other cases, a pointer (16-/32-bit) is far smaller than a full IPv6 address (128-bit), and the rest of it is basically relying on it to be a pointer). Should I introduce some temporary variable (additional 16-bit), just for that? Or could we change the `next_hop` parameter of `fib_get_next_hop()` maybe to a pointer of a pointer. That would also be in line with the rest of those parameters and it would probably also make the fib more efficient since you can just return a pointer to its internal memory, instead of copying it.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3233#issuecomment-114654397
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150623/66442765/attachment-0001.html>


More information about the notifications mailing list