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-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to