wengzhe commented on PR #11054:
URL: https://github.com/apache/nuttx/pull/11054#issuecomment-1853225126

   > @wengzhe I'm having some trouble getting this to work on my system. The 
NuttX device is responding to Neighbor Solicitation only on the first interface 
address. I think this is because the multicast MAC address to which 
solicitations are sent depends on the last 4 bytes of the IPv6 address. 
Therefore e.g. `fd00:1::1` and `fd00:2::1` on same NuttX interface would work 
because they have the same MAC address, but `fd00:1::2` wouldn't.
   > 
   > The IPv6 multicast MAC address is currently being added in architecture 
code, typically called 
[xxxxx_ipv6multicast()](https://github.com/apache/nuttx/blob/master/arch/arm/src/stm32/stm32_eth.c#L4018C13-L4071).
 Unfortunately this function is not exposed in the API so I'm not sure what 
would be the best approach for handling it. Adding a MAC address is supported 
using `dev->d_addmac()`, so possibly `_ipv6multicast()` function could be moved 
to main net code.
   
   Hello @PetteriAimonen , glad to see that you're trying this feature. I think 
your assumption is correct, it might be a MAC problem. I agree with your 
opinion, the current workflow of calling  `xxx_addmac` in `xxx_ipv6multicast` 
in `xxx_ifup` cannot handle any address change after `ifup`, and the code is 
written repeatedly everywhere. Maybe calling `d_addmac` in `netdev_ipv6_add` 
and calling `d_rmmac` in `netdev_ipv6_del` would be a better way (we don't need 
to expose `xxx_ipv6multicast` if we have `d_addmac` right?). I also find that 
`d_addmac` and `d_rmmac` are currently only enabled when 
`CONFIG_NET_MCASTGROUP` is set, maybe this condition should also be changed.


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