[PR #422] [MERGED] fix: filter out DOWN network interfaces in findLocalIpAddresses() #1556

Closed
opened 2026-10-29 21:28:25 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/422
Author: @phoenixwu0229
Created: 5/29/2025
Status: ✅ Merged
Merged: 5/29/2025
Merged by: @stmatengss

Base: main ← Head: 420-findlocalipaddresses-returns-ip-addresses-from-down-network-interfaces


📝 Commits (1)

  • 5d74bf2 fix: filter out DOWN network interfaces in findLocalIpAddresses()

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 mooncake-transfer-engine/src/transfer_metadata_plugin.cpp (+9 -0)

📄 Description

🐛 Problem
The findLocalIpAddresses() function in the transfer metadata plugin was incorrectly returning IP addresses from network interfaces that are in DOWN state. This caused connection failures and RPC timeouts when services attempted to bind or connect to these inactive IP addresses.
🔍 Root Cause
The current implementation only filters out the loopback interface (lo) but does not check the interface status flags (IFF_UP and IFF_RUNNING). As a result, it returns IP addresses from all non-loopback interfaces regardless of their operational state.
💡 Solution
Added proper interface status checks to ensure only active network interfaces are considered:
✅ Check IFF_UP flag (interface is administratively up)
✅ Check IFF_RUNNING flag (interface has a valid link/connection)
✅ Add informative logging for skipped and selected interfaces
✅ Maintain existing loopback interface filtering


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/Mooncake/pull/422 **Author:** [@phoenixwu0229](https://github.com/phoenixwu0229) **Created:** 5/29/2025 **Status:** ✅ Merged **Merged:** 5/29/2025 **Merged by:** [@stmatengss](https://github.com/stmatengss) **Base:** `main` ← **Head:** `420-findlocalipaddresses-returns-ip-addresses-from-down-network-interfaces` --- ### 📝 Commits (1) - [`5d74bf2`](https://github.com/kvcache-ai/Mooncake/commit/5d74bf2ad87a03c25a3033fb08263b13d565ce6e) fix: filter out DOWN network interfaces in findLocalIpAddresses() ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-transfer-engine/src/transfer_metadata_plugin.cpp` (+9 -0) </details> ### 📄 Description 🐛 Problem The findLocalIpAddresses() function in the transfer metadata plugin was incorrectly returning IP addresses from network interfaces that are in DOWN state. This caused connection failures and RPC timeouts when services attempted to bind or connect to these inactive IP addresses. 🔍 Root Cause The current implementation only filters out the loopback interface (lo) but does not check the interface status flags (IFF_UP and IFF_RUNNING). As a result, it returns IP addresses from all non-loopback interfaces regardless of their operational state. 💡 Solution Added proper interface status checks to ensure only active network interfaces are considered: ✅ Check IFF_UP flag (interface is administratively up) ✅ Check IFF_RUNNING flag (interface has a valid link/connection) ✅ Add informative logging for skipped and selected interfaces ✅ Maintain existing loopback interface filtering --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:28:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#1556
No description provided.