os/: Add IPv6 multicast support and fix BLE callback#7273
os/: Add IPv6 multicast support and fix BLE callback#7273abhinav-s235 wants to merge 1 commit intoSamsung:masterfrom
Conversation
- IPv6 multicast group join/leave socket options (IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP) - BLE callback parameter fix in ble_tizenrt_service.c - PREFERENCE_ERROR_NONE enum addition - Network interface name retrieval fix in netmgr_ioctl_netdev.c
PR #7273 — os/: Add IPv6 multicast support and fix BLE callback
Repository: Base → Head: HEAD Commit: Scope: Reviewed the GitHub PR diff for the 5 files shown on PR #7273. The fetched 🔎 Review Summary
Final Verdict: ❗ Request Changes 🚨 Must-Fix Issues1. The RTL8730E CCCD callback now corrupts the callback ABI instead of fixing it
Problem Impact
Evidence
Required Fix
Change outline:
Example patch: diff --git a/os/board/rtl8730e/src/component/bluetooth/example/ble_peripheral/ble_tizenrt_service.c b/os/board/rtl8730e/src/component/bluetooth/example/ble_peripheral/ble_tizenrt_service.c
@@
- p_cha_info->cb(TRBLE_ATTR_CB_CCCD, p_cccd_ind->conn_handle, p_cha_info->abs_handle, p_cccd_ind->value, 0, 0);
+ p_cha_info->cb(TRBLE_ATTR_CB_CCCD,
+ p_cccd_ind->conn_handle,
+ p_cha_info->abs_handle,
+ p_cha_info->arg,
+ p_cccd_ind->value,
+ 0);Inference:
Validation Method
2. `IPV6_JOIN_GROUP` / `IPV6_LEAVE_GROUP` ignores the requested interface and operates on every IPv6 netif
Problem Impact
Evidence
Required Fix
Change outline:
Example patch: diff --git a/os/net/lwip/src/api/sockets.c b/os/net/lwip/src/api/sockets.c
@@
- if (optname == IPV6_JOIN_GROUP) {
- err_ret = mld6_joingroup(IP6_ADDR_ANY6, &imr->ipv6mr_multiaddr);
- } else {
- err_ret = mld6_leavegroup(IP6_ADDR_ANY6, &imr->ipv6mr_multiaddr);
- }
+ ip_addr_t multi_addr;
+ ip_addr_t if_addr;
+ struct netif *netif = NULL;
+
+ inet6_addr_to_ip6addr(ip_2_ip6(&multi_addr), &imr->ipv6mr_multiaddr);
+ IP_SET_TYPE_VAL(multi_addr, IPADDR_TYPE_V6);
+
+ if (imr->ipv6mr_interface != 0) {
+ netif = lwip_ifindex_to_netif(imr->ipv6mr_interface);
+ if (netif == NULL) {
+ err = EADDRNOTAVAIL;
+ break;
+ }
+ ip_addr_copy_from_ip6(if_addr, *netif_ip6_addr(netif, 0));
+ } else {
+ ip_addr_set_any(IPADDR_TYPE_V6, &if_addr);
+ }
+
+ err_ret = netconn_join_leave_group(sock->conn, &multi_addr, &if_addr,
+ optname == IPV6_JOIN_GROUP ? NETCONN_JOIN : NETCONN_LEAVE);Inference:
Validation Method
3. The IPv6 multicast setsockopt path removed the existing socket-type and optlen guard
Problem Impact
Evidence
Required Fix
Change outline:
Example patch: diff --git a/os/net/lwip/src/api/sockets.c b/os/net/lwip/src/api/sockets.c
@@
- //LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct ipv6_mreq, NETCONN_UDP_IPV6);
+ LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, struct ipv6_mreq, NETCONN_UDP_IPV6);Inference:
Validation Method
🟡 Nice-to-Have Improvements1. Add focused regression coverage for the two new behavior changes that CI does not exercise directly
Problem Impact
Recommended Action
Expected Output
✅ Notable Improvements✔ The new socket-option constants match the standard Linux values
✔ The preference header now exposes an explicit success value
✔ The netmgr
|
IPv6 multicast group join/leave socket options (IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP)
BLE callback parameter fix in ble_tizenrt_service.c
PREFERENCE_ERROR_NONE enum addition
Network interface name retrieval fix in netmgr_ioctl_netdev.c