gnrc_ipv6_ext: use send for forwarding with RH#10229
Conversation
0365e20 to
1fa21d6
Compare
|
Rebased to current #10226 and master. |
1fa21d6 to
b505327
Compare
|
Rebased to current master and ready for review! |
|
@bergzand do you want to have a look? |
| /* remove L2 headers around IPV6 */ | ||
| netif_snip = gnrc_pktsnip_search_type(pkt, GNRC_NETTYPE_NETIF); | ||
| if (netif_snip != NULL) { | ||
| gnrc_pktbuf_remove_snip(pkt, netif_snip); |
There was a problem hiding this comment.
Shouldn't this be something like pkt = gnrc_pktbuf_remove_snip(pkt, netif_snip);?
There was a problem hiding this comment.
Technically you are right, but since it is highly unlikely, that the netif_snip is at the start of the list at this point, it isn't necessary. For consistency sake I will however do it.
|
@miri64 Do you happen to have a bit of python/scapy code I can use to test this? |
|
@bergzand This branch is going to provide the new tests but at the moment it is a very moving target (as I force-push and squash to it). For compile tests, I just used the current version of sendp(Ether() /
IPv6(dst=DST_ADDR) /
IPv6ExtHdrRouting(type=3, segleft=2, addresses=["fd02::1", "fd02::2"]) /
UDP(sport=1339, dport=1337) /
"\x00\x01", iface="tapbr0") I'm also planning to provide some |
|
Adressed comments |
|
I've played around with the branch here, but I'm not sure what functionality to expect with the runtime tests. I can bounce a frame from one instance to another, but proper reception on the destination host seems to fail. |
Meaning that after starting a UDP server on the destination host, I don't seem to be able to craft a frame that actually arrives at the UDP handler thread on that host. |
|
I'll provide some test descriptions tomorrow (though #10392 provides a test case for this) |
|
Ok here is a test descripition. However, you will need #10422 for it to work properly:
First packet should be outputted on Second packet should be outputted on Both should contain a |
|
Then I wait for #10421 to be merged first :-) |
Comments were addressed, but @bergzand currently doesn't have time to review.
|
Followed the testing procedure. Here are the results: native1: native2 Got same results as described in the testing procedure |
|
code style (vera++) is OK |
BTW the file has 2 empty lines in the end. But it's not related to this PR ;) |
|
May I squash? |
Yes, please |
Though this change might seem more complicated, it has the benefit, that after RIOT-OS#9484 we don't have to assume that a received packet within IPv6's receive function can be handed to the function pre-parsed, making that function far less complicated (will be provided in a future PR). Also this might give the forwarding via routing header a little performance boost, as we now don't *receive* the packet first only to forward it later-on.
a710a29 to
b530c1b
Compare
|
Squashed |
…/shortcut-forward
Contribution description
Though this change might seem more complicated, it has the benefit, that
after #9484 we don't have to assume that a received packet within IPv6's
receive function can be handed to the function pre-parsed, making that
function far less complicated (will be provided in a future PR).
Also this might give the forwarding via routing header a little
performance boost, as we now don't receive the packet first only to
forward it later-on.
Testing procedure
From #10229 (comment) (corrected one inconsistency though):
Issues/PRs references
Depends on
#10226(merged). Needs#10422 for testing(merged)