net/route: fix return value of net_writeroute_ipv6

Return ntotal (total bytes written) instead of ret (result of last
write call). This matches the expected semantics and is consistent
with net_writeroute_ipv4().

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu
2026-04-13 14:36:34 +08:00
committed by Alan C. Assis
parent c6c7cf6bba
commit 34fbaa15ee
+1 -1
View File
@@ -475,7 +475,7 @@ ssize_t net_writeroute_ipv6(FAR struct file *filep,
while (ntotal < sizeof(struct net_route_ipv6_s));
net_unlockroute_ipv6();
return ret;
return ntotal;
}
#endif