wengzhe opened a new pull request, #2220: URL: https://github.com/apache/nuttx-apps/pull/2220
## Summary Patches included: - nshlib/ifconfig: Set network mask before setting gateway - Switch the order of setting network mask and gateway, re-order only, no logic change. - nshlib/ifconfig: Generate default IPv4 gateway with netmask - Generate default gateway using configured netmask instead of fixed 255.255.255.0, which may be more flexible under certain situations. e.g. A subnet like 10.0.23.16/28 may not contain the .1 address. Before: ifconfig eth0 10.0.23.22 netmask 255.255.255.252 => DRaddr:10.0.23.1 ifconfig eth0 10.0.23.22 netmask 255.255.255.240 => DRaddr:10.0.23.1 ifconfig eth0 10.0.23.22 netmask 255.255.255.0 => DRaddr:10.0.23.1 ifconfig eth0 10.0.23.22 netmask 255.255.0.0 => DRaddr:10.0.23.1 ifconfig eth0 10.0.23.22 => Mask:255.255.255.0 DRaddr:10.0.23.1 After: ifconfig eth0 10.0.23.22 netmask 255.255.255.252 => DRaddr:10.0.23.21 ifconfig eth0 10.0.23.22 netmask 255.255.255.240 => DRaddr:10.0.23.17 ifconfig eth0 10.0.23.22 netmask 255.255.255.0 => DRaddr:10.0.23.1 ifconfig eth0 10.0.23.22 netmask 255.255.0.0 => DRaddr:10.0.0.1 ifconfig eth0 10.0.23.22 => Mask:255.255.255.0 DRaddr:10.0.23.1 ## Impact ifconfig command ## Testing Manually -- 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