From 34fbaa15eead79bfa466d88e2c5fbef600e93707 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Mon, 13 Apr 2026 14:36:34 +0800 Subject: [PATCH] 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 --- net/route/net_fileroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/route/net_fileroute.c b/net/route/net_fileroute.c index 16f477c95f3..1f30e897c1a 100644 --- a/net/route/net_fileroute.c +++ b/net/route/net_fileroute.c @@ -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