-
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
gnrc_sixlowpan_nhc: fix forwarding case #6064
gnrc_sixlowpan_nhc: fix forwarding case #6064
Conversation
@miri64 I use a patched version of RIOT+RPL (see here), where I blacklist a certain node that is not allowed as parent, i.e., the RPL root in my scenario. You can specifiy the MAC address of that node in the Makefile by a macro. So the first hop node is an unpatched RIOT+RPL and the second hope nodes uses the described mod with the RPL root (or border router) as denied parent. |
Okay, will try that. Tomorrow ;-) |
Okay, I tried it now but with a different hack directly on the link layer: diff --git a/sys/net/gnrc/link_layer/netdev2/gnrc_netdev2_ieee802154.c b/sys/net/gnrc/link_layer/netdev2/gnrc_netdev2_ieee802154.c
index 4903662..ad7eb42 100644
--- a/sys/net/gnrc/link_layer/netdev2/gnrc_netdev2_ieee802154.c
+++ b/sys/net/gnrc/link_layer/netdev2/gnrc_netdev2_ieee802154.c
@@ -24,6 +24,10 @@
#define ENABLE_DEBUG (0)
#include "debug.h"
+#ifdef GNRC_NETDEV2_IEEE802154_IGNORE
+static uint8_t _ignore[][IEEE802154_LONG_ADDRESS_LEN] = GNRC_NETDEV2_IEEE802154_IGNORE;
+#endif
+
static gnrc_pktsnip_t *_recv(gnrc_netdev2_t *gnrc_netdev2);
static int _send(gnrc_netdev2_t *gnrc_netdev2, gnrc_pktsnip_t *pkt);
@@ -50,6 +54,15 @@ static gnrc_pktsnip_t *_make_netif_hdr(uint8_t *mhr)
DEBUG("_make_netif_hdr: unable to get addresses\n");
return NULL;
}
+#ifdef GNRC_NETDEV2_IEEE802154_IGNORE
+ for (unsigned i = 0; i < (sizeof(_ignore) / IEEE802154_LONG_ADDRESS_LEN);
+ i++) {
+ if (memcmp(_ignore[i], src, src_len) == 0) {
+ DEBUG("_make_netif_hdr: source address ignored\n");
+ return NULL;
+ }
+ }
+#endif
/* allocate space for header */
snip = gnrc_netif_hdr_build(src, (size_t)src_len, dst, (size_t)dst_len);
if (snip == NULL) { I can't however confirm the behavior @smlng have shown in #5926 :(. My dumps come out as expected. If I can get a second confirmation (@aabadie, @kYc0o?) I would prefer to merge this ASAP and figure out later what @smlng's specific problem is. |
(I used the |
@aabadie I tried the IoT-Lab CoAP tutorial with this PR but it didn't work... Before stating that this PR doesn't solve the problem, could you try it too? |
Can you describe this scenario (or give me a link) so I can try myself instead of poking in the dark ;-) |
You can try this tutorial but using the current EDIT: I meant to try the tutorial with this PR merged into master. |
I thought this is not possible oO |
It IS possible ;-) |
Then why do we need this fix?!!? |
Also
I am very confused now. |
Well... it WAS possible, this PR it's aiming to fix it isn't it? |
Also: I noticed that since |
(BTW Point 7 of the tutorial can now be made with |
The tutorial works with a specific version of RIOT which is quite old, before the introduction of a PR which break this functionality (I'll try to point out which one), so with this fix it's supposed to work again with the current master.
Pings succeed while CoAP requests don't. As for the prefix I checked and it has one. |
Okay, will check tomorrow as to why that is. |
Edited comment. |
Confirmed |
@aabadie do you give an ACK then? :D |
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.
ACK
Murdock is also happy :-) |
So go ! |
Backport provided in #6095 |
Alternative to #5926 as proposed by @Yonezawa-T2. @smlng I was not able to reproduce your scenario, since my CoAP server always connected to the border router automatically. Can you tell me how to blacklist that? I'd like to have this fixed also.