-
-
Notifications
You must be signed in to change notification settings - Fork 161
feat(net): [WIP] 桥接网络支持 #1287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(net): [WIP] 桥接网络支持 #1287
Conversation
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
- Removed the default_iface parameter. - Introduced a new NAPI module to manage network polling and scheduling. - Updated the Iface trait to include a napi_struct method for NAPI support. - Modified Veth network interfaces to integrate with the new NAPI structure. - Refactored the Router implementation to remove unnecessary polling threads and wait queues. - Updated NetNamespace to manage a list of bridge devices. - Cleaned up various unused methods and comments across network-related files. Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
Signed-off-by: sparkzky <[email protected]>
bugbot run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
// 或者需要遍历 reverse_mappings 找到 value 为 key 的条目并删除。 | ||
// 为简单起见,这里只清理主表。更健壮的实现需要双向链接或引用计数。 | ||
log::info!("Cleaned up expired connection for key: {:?}", key); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
let chunks = unsafe { from_raw_parts(byte_buffer.as_ptr() as *const T, 1) }; | ||
let data = &chunks[0]; | ||
return Ok(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Unsafe Cast and Excessive Logging
The convert_one_from_raw_buf
function performs an unsafe cast from a byte slice to &T
without verifying proper alignment for type T
. This can lead to undefined behavior, crashes, or data corruption. Separately, a log::info!
statement in this function will cause excessive logging in production.
.inner | ||
.lock() | ||
.bridge_common_data | ||
.as_ref() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此PR为OSPP-DragonOS 桥接网络支持
已实现:
待补充: