Skip to content

feat(dgw): mDNS network scan support#693

Merged
Benoît Cortier (CBenoit) merged 12 commits into
masterfrom
Network-Scan-Zero-Conf
Feb 14, 2024
Merged

feat(dgw): mDNS network scan support#693
Benoît Cortier (CBenoit) merged 12 commits into
masterfrom
Network-Scan-Zero-Conf

Conversation

@irvingoujAtDevolution
Copy link
Copy Markdown
Contributor

@irvingoujAtDevolution irvingouj@Devolutions (irvingoujAtDevolution) commented Feb 12, 2024

Add mdns to network scan, added some extra helper method for better readbility and maintainbility.

Open for review but needs to wait for the #689 to be merged first

Comment thread crates/network-scanner/src/mdns.rs
Copy link
Copy Markdown
Contributor

@pauldumais Paul Dumais (pauldumais) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this is awesome, LGTM

Copy link
Copy Markdown
Member

@CBenoit Benoît Cortier (CBenoit) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I’m blocking the merge because the retry loop logic seems erroneous to me. Can you double check?

Comment thread Cargo.lock
Comment on lines +2011 to +2036
"polling 2.8.0",
"socket2 0.4.10",
Copy link
Copy Markdown
Member

@CBenoit Benoît Cortier (CBenoit) Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (non-blocking): This crate is using outdated dependencies, and this causes dependency duplication. Do you think you could send a PR for updating them soonish? It’s okay to wait until you are done with implementing the feature first. If you don’t do it now, can you create a Jira ticket to not forget? Thank you.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created PR to mdsn-sd

Comment thread crates/network-scanner/src/lib.rs Outdated
Comment thread crates/network-scanner/src/mdns.rs
Comment thread crates/network-scanner/examples/mdns.rs Outdated
Comment thread crates/network-scanner/src/mdns.rs
Comment on lines -302 to +352
pub ping_interval: u64, // in milliseconds
pub ping_timeout: u64, // in milliseconds
pub broadcast_timeout: u64, // in milliseconds
pub port_scan_timeout: u64, // in milliseconds
pub netbios_timeout: u64, // in milliseconds
pub netbios_interval: u64, // in milliseconds
pub max_wait_time: u64, // max_wait for entire scan duration in milliseconds, suggested!
pub ping_interval: u64, // in milliseconds
pub ping_timeout: u64, // in milliseconds
pub broadcast_timeout: u64, // in milliseconds
pub port_scan_timeout: u64, // in milliseconds
pub netbios_timeout: u64, // in milliseconds
pub netbios_interval: u64, // in milliseconds
pub mdns_meta_query_timeout: u64, // in milliseconds
pub mdns_single_query_timeout: u64, // in milliseconds
pub max_wait_time: u64, // max_wait for entire scan duration in milliseconds, suggested!
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: We should probably use the Duration type instead. Should be addressed separately.

@CBenoit Benoît Cortier (CBenoit) marked this pull request as draft February 13, 2024 08:59
@CBenoit
Copy link
Copy Markdown
Member

Open for review but needs to wait for the #689 to be merged first

Converted to draft to make it obvious.

@CBenoit Benoît Cortier (CBenoit) changed the title feat(dgw):add mdns for network scan feat(dgw): mDNS network scan support Feb 13, 2024
Comment thread crates/network-scanner/src/lib.rs Outdated
Copy link
Copy Markdown
Member

@CBenoit Benoît Cortier (CBenoit) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks mostly good. I spotted two other issues which should be fixed, and then we can merge.

Comment thread crates/network-scanner/src/mdns.rs Outdated
Comment thread devolutions-gateway/src/api/mod.rs Outdated
.nest("/jet/config", config::make_router(state.clone()))
.nest("/jet/session", session::make_router(state.clone()))
.nest("/jet/sessions", sessions::make_router(state.clone()))
.nest("/jet/sessions", session::make_router(state.clone()))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: Any reason for this? This looks very problematic (creating the wrong router).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a mistake, thank you for point it out!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Comment thread crates/network-scanner/src/mdns.rs Outdated
Co-authored-by: Benoît Cortier <bcortier@proton.me>
Copy link
Copy Markdown
Member

@CBenoit Benoît Cortier (CBenoit) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@irvingoujAtDevolution
Copy link
Copy Markdown
Contributor Author

LGTM! 🚀

Merci!

@CBenoit Benoît Cortier (CBenoit) merged commit 043a2b7 into master Feb 14, 2024
@CBenoit Benoît Cortier (CBenoit) deleted the Network-Scan-Zero-Conf branch February 14, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants