-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/network_layer/fib: added prefix consideration for RRP registration/signaling #2915
net/network_layer/fib: added prefix consideration for RRP registration/signaling #2915
Conversation
@@ -294,16 +299,19 @@ static int fib_signal_rrp(uint8_t *dst, size_t dst_size, uint32_t dst_flags) | |||
msg.content.ptr = (void *)&content; | |||
|
|||
for (size_t i = 0; i < FIB_MAX_RRP; ++i) { | |||
if (notify_rrp[i] != KERNEL_PID_UNDEF) { | |||
if ((notify_rrp[i] != KERNEL_PID_UNDEF) && (prefix_rrp[i] != NULL)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this check really need to happen if you're forcing protocols to supply their prefix anyway? If I understand it correctly, the purpose of this line is to weed out the “empty” entries, so just checking for KERNEL_PID_UNDEF
should suffice, shouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops true, I was a bit overcautious here.
4fd96bc
to
17ea02d
Compare
squashed, now its travis time. |
Goooo Travis! ᕕ( ᐛ )ᕗ (σ・・)σ ♪┏(・o・)┛♪┗ ( ・o・) |
@Lotterleben I forgot that I want to change the name of the function 😁 since it should be used by any routing protocol regardless if its reactive or proactive. will be: int fib_register_rp(uint8_t *prefix, size_t prefix_size); Any complaints renaming it here? (I will do a commit but we can remove it here) |
bd083d8
to
eda6bc9
Compare
@BytesGalore nope, that name is fine by me :) |
What about the |
@Lotterleben a |
eda6bc9
to
2a83b56
Compare
squashed. |
@BytesGalore argh sorry, I got confused. Of course. |
Then, ACK when travis is happy |
Kicked Travis... Seems like there was some interference with github's downtime. |
2a83b56
to
83abf1d
Compare
I'd love to merge this, just don't know what seems to be the problem according to Travis.. :( |
Trying to build the unittest for any platform results in
|
0ce52f6
to
bb4b687
Compare
@OlegHahm thx, I think I forced pushed the broken line :( sorry. |
As I introduced a new msg type here I wonder if it would make sense to collect all configurable types/options/defines for the FIB in one specific header to easily be able to configure all aspects. What do you think @Lotterleben, @OlegHahm, @cgundogan ? |
There seems to be something else broken:
|
Sounds like a good idea to me. |
+1 regarding the header. |
ok, beside the need for squashing travis seems to be quite happy |
Let's squash then. |
60a79c5
to
85bf1c2
Compare
Ok, then I think I will do a |
Are you going to do open an new PR for the |
@Lotterleben I will open a new PR for the configuration header. It will be transparent for the user, so we don't need to wait to merge :) . |
Well then let's go! |
net/network_layer/fib: added prefix consideration for RRP registration/signaling
This PR forces to provide a prefix on register Reactive Routing Protocol (RRP), which is used to determine if the RRP can find a route to a searched destination address.
Rationale:
The current FIB does not consider a prefix per RRP registration.
This way all registered RRPs are signalled to start a route discovery for a given destination address without a check if the RRP can handle the prefix for the given destination.