You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Laczen (via GitHub)" <gi...@apache.org> on 2025/03/12 10:01:23 UTC
[PR] net: sixlowpan icmpv6 return from udp_input [nuttx]
Laczen opened a new pull request, #15980:
URL: https://github.com/apache/nuttx/pull/15980
## Summary
When a udp frame is processed without a listener a icmp frame is returned indicating that there is no listener. The PR enables sending this icmpv6 response over sixlowpan.
Solves #15972.
## Impact
* Is new feature added? YES
* Impact on user (will user need to adapt to change)? NO
* Impact on build (will build process change)? NO - Changes are localized to the networking stack.
* Impact on hardware (will arch(s) / board(s) / driver(s) change)? NO - This is a software fix affecting network protocol handling.
* Impact on documentation (is update required / provided)? NO - The fix addresses an undocumented edge case.
* Impact on security (any sort of implications)? NO - While the bug could disrupt communication, it did not introduce a direct security vulnerability. The fix further enhances robustness.
* Impact on compatibility (backward/forward/interoperability)? NO - The fix corrects erroneous behavior and should not impact compatibility. Applications relying on the previous, incorrect behavior might need minor adjustments (though this is unlikely).
* Anything else to consider? None.
## Testing
The correct operation was verified on two sixlowpan nodes over espnow. A udpclient would send packages to a node with not operational udpserver.
The client shows (the last line shows that the destination is unreachable):
```
udp_callback: flags: 0010
send_eventhandler: flags: 0010
sixlowpan_queue_frames: buflen=96
sixlowpan_queue_frames: Sending packet length 96
sixlowpan_compresshdr_hc06: fptr=0x3ffb38b0 g_frame_hdrlen=8 iphc=0x3ffb38b8
compress_laddr: Compressing bitpos=4
compress_laddr: srcipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000b
compress_laddr: addr=0b
compress_laddr: Tag=30
compress_tagaddr: Compressing bitpos=0 addrlen=1
compress_tagaddr: ipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000a
compress_tagaddr: addr=0a
compress_tagaddr: Tag=03
sixlowpan_compresshdr_hc06: Uncompressed UDP ports: srcport=1560 destport=155f
sixlowpan_compresshdr_hc06: WARNING: Cannot compress headers
sixlowpan_compresshdr_hc06: fptr=0x3ffb38b0 g_frame_hdrlen=17 iphc=7e:33:f0 g_hc06ptr=0x3ffb38c1
sixlowpan_queue_frames: Header of length=17 protosize=0
sixlowpan_queue_frames: Non-fragmented: length 113
sixlowpan_queue_frames: Submitting frame length=113 io_offset=8
espnow_req_data: Queuing frame IOB 0x3ffb38a4
espnow_req_data: MAC: 0a
espnow_req_data: MAC: 0b
client: 51. Sent 96 bytes
espnow_work: Send frame 0x3ffb38a4 to the network: Offset=0 Length=163
sixlowpan_frame_process: IPHC Dispatch
sixlowpan_uncompresshdr_hc06: fptr=0x3ffb38b0 g_frame_hdrlen=8 iphc=7b:33:3a g_hc06ptr=0x3ffb38ba
sixlowpan_uncompresshdr_hc06: Next header inline: 58
uncompress_addr: Uncompressing 2 + 1 ipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000a
uncompress_addr: Uncompressing 2 + 1 ipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000b
sixlowpan_frame_process: rb_accumlen=0 rb_pktlen=192 paysize=152
sixlowpan_frame_process: IP packet ready (length 192)
sixlowpan_dispatch: IPv6 packet dispatch
icmpv6_input: WARNING: Unknown ICMPv6 type: 1
```
The server shows (line 12 shows there is no listener and generates a response):
```
espnow_work: Send frame 0x3ffb3974 to the network: Offset=0 Length=113
sixlowpan_frame_process: IPHC Dispatch
sixlowpan_uncompresshdr_hc06: fptr=0x3ffb3980 g_frame_hdrlen=8 iphc=7e:33:f0 g_hc06ptr=0x3ffb398a
uncompress_addr: Uncompressing 2 + 1 ipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000b
uncompress_addr: Uncompressing 2 + 1 ipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000a
sixlowpan_uncompresshdr_hc06: Incoming header value: 240
sixlowpan_uncompresshdr_hc06: Uncompressed UDP ports (ptr+5): 1560, 155f
sixlowpan_uncompresshdr_hc06: Checksum included
sixlowpan_frame_process: rb_accumlen=0 rb_pktlen=144 paysize=96
sixlowpan_frame_process: IP packet ready (length 144)
sixlowpan_dispatch: IPv6 packet dispatch
udp_input: WARNING: No listener on UDP port
ipv6_build_header: IPv6 Payload length: 152
icmpv6_reply: Outgoing ICMPv6 packet length: 192
sixlowpan_icmpv6_send: d_len 192
sixlowpan_queue_frames: buflen=148
sixlowpan_queue_frames: Sending packet length 148
sixlowpan_compresshdr_hc06: fptr=0x3ffb37e0 g_frame_hdrlen=8 iphc=0x3ffb37e8
compress_laddr: Compressing bitpos=4
compress_laddr: srcipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000a
compress_laddr: addr=0a
compress_laddr: Tag=30
compress_tagaddr: Compressing bitpos=0 addrlen=1
compress_tagaddr: ipaddr=fe80:0000:0000:0000:0000:00ff:fe00:000b
compress_tagaddr: addr=0b
compress_tagaddr: Tag=03
sixlowpan_compresshdr_hc06: fptr=0x3ffb37e0 g_frame_hdrlen=11 iphc=7b:33:3a g_hc06ptr=0x3ffb37eb
sixlowpan_queue_frames: Header of length=11 protosize=4
sixlowpan_queue_frames: Non-fragmented: length 163
sixlowpan_queue_frames: Submitting frame length=163 io_offset=8
espnow_req_data: Queuing frame IOB 0x3ffb37d4
espnow_req_data: MAC: 0b
espnow_req_data: MAC: 0a
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] net: sixlowpan icmpv6 return from udp_input [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao merged PR #15980:
URL: https://github.com/apache/nuttx/pull/15980
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] net: sixlowpan icmpv6 return from udp_input [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #15980:
URL: https://github.com/apache/nuttx/pull/15980#issuecomment-2718841006
@xiaoxiang781216 @wengzhe please take a look
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] net: sixlowpan icmpv6 return from udp_input [nuttx]
Posted by "nuttxpr (via GitHub)" <gi...@apache.org>.
nuttxpr commented on PR #15980:
URL: https://github.com/apache/nuttx/pull/15980#issuecomment-2717359353
[**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues)
This PR appears to meet the NuttX requirements. The summary, impact, and testing sections are all well-written and provide the necessary information. The testing section, in particular, is thorough and demonstrates that the change works as intended. The inclusion of logs before and after the change, along with a clear explanation of the test setup, makes it easy to understand the impact and verify the fix. The connection to issue #15972 is also helpful.
One minor suggestion: While the testing logs are good, summarizing the key differences observed in the logs within the testing description would improve readability and understanding at a glance. For example, explicitly stating "Before the change, the client did not receive a destination unreachable message. After the change, the client correctly receives the ICMPv6 destination unreachable message" would further strengthen the testing section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org