-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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: icmpv4: Drop ICMPv4 packet if ICMP header is NULL #6170
net: icmpv4: Drop ICMPv4 packet if ICMP header is NULL #6170
Conversation
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.
Looks good, minor nit pick.
subsys/net/ip/ipv4.c
Outdated
@@ -143,6 +143,11 @@ static inline enum net_verdict process_icmpv4_pkt(struct net_pkt *pkt, | |||
|
|||
icmp_hdr = net_icmpv4_get_hdr(pkt, &hdr); | |||
|
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.
Usually we do not have empty line after setting the var and then checking it, so you could remove this extra line here.
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.
Thanks for info. Updated patch pushed.
Codecov Report
@@ Coverage Diff @@
## master #6170 +/- ##
==========================================
- Coverage 52.86% 52.86% -0.01%
==========================================
Files 412 412
Lines 40284 40286 +2
Branches 7802 7803 +1
==========================================
Hits 21296 21296
- Misses 15773 15774 +1
- Partials 3215 3216 +1
Continue to review full report at Codecov.
|
79fa6b4
to
af91a54
Compare
Patch amended by removing empty line and pushed. |
This commit fixes the crash of echo_server from malformed ICMPv4 packet. Fixes zephyrproject-rtos#6081 Signed-off-by: Ruslan Mstoi <[email protected]>
This commit fixes the crash of echo_server from malformed ICMPv4 packet.
Fixes #6081
Signed-off-by: Ruslan Mstoi [email protected]