OceanfromXiaomi opened a new pull request, #18260: URL: https://github.com/apache/nuttx/pull/18260
## Summary This pull request adds two new device flags (`IFF_NOSRC_FORWARD` and `IFF_NODST_FORWARD`) to the NuttX network forwarding subsystem to provide control over packet forwarding behavior. **Why change is necessary:** - Current implementation lacks control over which devices can participate in packet forwarding - Users need ability to selectively enable/disable forwarding on specific devices for security and network configuration flexibility **What functional part is being changed:** - Network device interface flags in `include/net/if.h` - IPv4 forwarding logic in `net/ipforward/ipv4_forward.c` - IPv6 forwarding logic in `net/ipforward/ipv6_forward.c` **How the change works:** - `IFF_NOSRC_FORWARD` flag: Controls whether a device can act as a source device for forwarding packets - `IFF_NODST_FORWARD` flag: Controls whether a device can act as a destination device for receiving forwarded packets - Forwarding functions check these flags before forwarding packets, allowing selective enable/disable per device ## Impact - **New feature added:** YES - Two new device flags for forwarding control - **Existing feature changed:** Forwarding behavior now depends on device flags, but backward compatible (flags default to enabled) - **Impact on user:** Users can now control forwarding behavior per-device through these flags. No action required for existing code - default behavior unchanged. - **Impact on build:** NO - No changes to build process - **Impact on hardware:** YES - Affects all architectures that use network forwarding features (IPv4 and IPv6) - **Impact on documentation:** YES - Device flags should be documented in network configuration documentation - **Impact on security:** YES - Provides additional security control by allowing selective forwarding disable per device - **Impact on compatibility:** NO - Fully backward compatible. New flags do not break existing code. ## Testing I confirm that changes are verified on local setup and work as intended: **Build Host:** - OS: Linux - CPU: x86_64 - Compiler: GCC version [specify your GCC version] **Target(s) tested:** - Architecture: [ARM] - Board: [infineon TC4d9 board] -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
