casaroli opened a new pull request, #4167:
URL: https://github.com/apache/nuttx-apps/pull/4167

   ## Summary
   
   `netutils/netlib/netlib_conntrack.c` did not compile with 
`CONFIG_NETLINK_NETFILTER` and without `CONFIG_NET_IPv6`: 
`netlib_ct_parse_ip()` used the member `ipv6` of `union 
netlib_conntrack_addr_u` and `net_ipv6addr_hdrcopy()`, which exist only with 
`CONFIG_NET_IPv6`. The IPv4 cases have the same problem without 
`CONFIG_NET_IPv4`.
   
   The function now handles each address family only when it is enabled. The 
kernel sends the attributes of a family only when that family is enabled 
(`net/netlink/netlink_netfilter.c`: IPv4 with `CONFIG_NET_NAT44`, IPv6 with 
`CONFIG_NET_NAT66`).
   
   ## Impact
   
   Build fix only. No change when both IPv4 and IPv6 are enabled.
   
   ## Testing
   
   `qemu-armv8a:netnsh_smp` with `CONFIG_NETLINK_NETFILTER=y` 
(`CONFIG_NET_NAT`, `CONFIG_NET_NAT44`, `CONFIG_NET_IPFORWARD`) and without 
`CONFIG_NET_IPv6`, nuttx master, `-Werror`:
   
   - Before: `netlib_conntrack.c:76:13: error: implicit declaration of function 
'net_ipv6addr_hdrcopy'` and `netlib_conntrack.c:76:46`, `:79:46: error: 'union 
netlib_conntrack_addr_u' has no member named 'ipv6'`.
   - After: the build ends with `nuttx` linked, no warning.
   
   The same configuration with `CONFIG_NET_IPv6=y` builds before and after. 
checkpatch passes.
   


-- 
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]

Reply via email to