-
Notifications
You must be signed in to change notification settings - Fork 236
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
[posix] add netif TUN Ip6 Sending #2452
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2452 +/- ##
===========================================
- Coverage 55.77% 45.78% -10.00%
===========================================
Files 87 99 +12
Lines 6890 11657 +4767
Branches 0 846 +846
===========================================
+ Hits 3843 5337 +1494
- Misses 3047 6046 +2999
- Partials 0 274 +274 ☔ View full report in Codecov by Sentry. |
2a5488b
to
a2778fa
Compare
345a2db
to
1b5d334
Compare
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.
LGTM. Thanks.
Couple of smaller suggestions below:
if (mTunFd > aContext->mMaxFd) | ||
{ | ||
aContext->mMaxFd = mTunFd; | ||
} |
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.
Not for this PR but a possible enhancement idea (for future PR)
I assume this pattern of adding certain fd
to MainloopContext
(updating mReadFdSet
and mErrorFdSet
and then also updating mMaxFd
) might be done in several places in the code.
It could be helpful to add a method on MainloopContext
for this. This would simplify the code and ensure we always update mMaxFd
as well.
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.
This is great! I'll do that in a seperate PR.
d54b649
to
f1e90f6
Compare
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.
LGTM
f1e90f6
to
27e9d17
Compare
This PR implements netif TUN Ip6 forwarding.
In specific, when a packet from the system is sent to the wpan interface, the Netif module will do the Ip6 sending. In this PR the actual sending (let NCP send the IP6 packet) hasn't been implemented and an empty implementation is used.
The PR also adds a unit test to verify IP packet sent through wpan interface can be successfully handled in netif.