-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gnrc ipv6: append empty netif hdr for loopback #5247
Conversation
What are the implications of this regarding the chosen interface? |
Not sure what you mean. The interface should be |
I can confirm that this fixes the crash experienced in #4725. |
Yes, but how does IPv6 react to that fact in the long run? |
Yes, but how does IPv6 react to that fact in the long run?
Let's ask someone who must know... ;)
|
I hope IPv6 stops sending RAs to the loopback interface in the long run. ;) |
The requirement for netif headers wasn't my idea, so I ask what the expected behavior for its iface value set to |
I still don't quite understand the actual question. |
I want to know, if in the current implementation it is problematic when the given interface is set to |
The more I think about it, I think reverting #5179 and amending the else-case is far less intrusive and restricting (given that |
IMO I still think that an upper layer should have the information about which interface a packet was received. |
Kk, but I repeat (and modify) my question from #5179: Can we think about other cases except loopback where |
Yes. |
But then we can't assume |
What about other link layer information? NDP or CCN requires information about the sender's link layer address, too. |
NDP doesn't require that. It should by (and is to my knowledge) able to also handle address-less link-layers as e.g. SLIP. As for CCN: how do you handle the loopback case then and isn't this applicable for other "interface-less" packets? |
There's no loopback in CCN. |
Then what has it to do with this PR / with the argument if a netif header is required for IPv6 or not? |
I don't know, you asked. Anyhow, I'm tired of discussing this over and over again. IMO it would be far more important to debug why RAs are sent over the loopback interface in the first place instead of discussing the same things again and again. |
I'm just advocating for questioning what we are doing before applying some "quick-fix" that opens a whole new well of problems, which then open another can and so on... Otherwise I fear we run into a similar situation as with the previous stack were nobody knows anymore what's going on exactly. |
Problem is, except the both of us nobody gave an argument to one or the other side. What is your opinion, @cgundogan @haukepetersen @kaspar030? |
How about defining -1 as system-wide as the identifier for loopback (also would be so beautifully symbolic because it mirrors [or in other terms negates] packets :D) |
(but we still shouldn't make netif-headers a requirement, just if the user wants to specifically address the loopback interface). |
ping? |
I haven't changed my mind. |
Postponed due to feature freeze |
3d35474
to
b789680
Compare
I added a system-wide identifier for the loopback interface and rebased the PR. @miri64, what do you think? |
@@ -41,6 +41,11 @@ extern "C" { | |||
#endif | |||
|
|||
/** | |||
* @brief Identifier of the loopback interface | |||
*/ | |||
#define GNRC_NETIF_LOOPBACK_PID (-1) |
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.
I'd rather have it a positive number (maybe KERNEL_PID_MAX
?), since I think there might be checks for >= KERNEL_PID_UNDEF
in the code.
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.
Actually, -1 was your proposal:
#5247 (comment)
KERNEL_PID_LAST + 1
would work for me, too.
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.
Mh, then I trust past me for now. Let's test this :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.
assertion fails at gnrc_ipv6.c:817
when pinging ::1
or one of the node's unicast link local addresses in the gnrc_networking
application.
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.
Considering that I chose -1
as NETIF_INVALID
in #6413, I would actually prefer KERNEL_PID_LAST + 1
now.
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.
Ping?
Since a redo of GNRC's network interfaces is in the pipeline, I think I can include a loopback, but adding an empty netif header for loopback isn't the solution, due to its ambiguity. |
So you propose to close this one? |
Nope, keep it open as a reminder. But I still don't agree that every packet must have a netif header on sending. |
I think I prefer this one to be closed now as well. I plan to add some proper loopback representation when #7925 is through anyways |
The netif header gets discarded during the reverse procedure.