-
Notifications
You must be signed in to change notification settings - Fork 12
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
R2S rousette crash on boot if LAN not connected #751
Comments
Reproduced on my R2S:
|
Workaround, as suggested by @mattiaswal, helps: admin@r2s:/cfg$ diff backup.cfg startup-config.cfg
--- backup.cfg
+++ startup-config.cfg
@@ -39,7 +39,8 @@
},
{
"name": "wan",
- "type": "infix-if-type:ethernet"
+ "type": "infix-if-type:ethernet",
+ "ietf-ip:ipv6": {}
}
]
}, |
If I try to mimic the same setup in Qemu, using the x86_64 build, by disabling ipv6 on all ethernet interfaces, I cannot reproduce the problem. Very odd, need to discuss this further with @mattiaswal. |
After discussions with @mattiaswal and the rest of core team, we decided yesterday to check if this was an issue also with the standard aarch64 builds on tier one customer HW (Marvell CRB derivatives). These tests were concluded this morning, without any problems. So, it seems this issue is localized to the R2S build. |
Also had that issue with rousette bailing out with: rousette[1957]: terminate called after throwing an instance of 'std::runtime_error' Turns out that the boost library is not willing to resolve a numeric IPv6 host (::1) because its resolver flags are set to address_configured by default. The following patch resolved it for me: --- nghttp2-asio-e877868abe06a83ed0a6ac6e245c07f6f20866b5/lib/asio_server.cc
+++ nghttp2-asio-e877868abe06a83ed0a6ac6e245c07f6f20866b5/lib/asio_server.cc
@@ -82,8 +82,13 @@ boost::system::error_code server::bind_and_listen(boost::system::error_code &ec,
// Open the acceptor with the option to reuse the address (i.e.
// SO_REUSEADDR).
tcp::resolver resolver(io_service_pool_.get_io_service());
+
tcp::resolver::query query(address, port);
auto it = resolver.resolve(query, ec);
+ if (ec) {
+ tcp::resolver::query query(address, port, boost::asio::ip::resolver_query_base::numeric_host);
+ auto it = resolver.resolve(query, ec);
+ }
if (ec) {
return ec;
} |
Nice catch! Do you think you could try and get this patch in upstream so we can use a backport of that in Infix? A bit unsure of the state of that upstream though, do you know more @mattiaswal? |
The boost library refuses to resolve a numeric IPv6 host (::1) because its resolver flags are set to 'address_configured' by default. This patch simply runs an additional query in such a case with flags set to 'numeric_host'. See https://www.boost.org/doc/libs/1_83_0/doc/html/boost_asio/reference/ip__resolver_base.html for more info. Fixes kernelkit#751 Signed-off-by: Stefan Schlosser <[email protected]>
Current Behavior
The system booted with WAN connected and LAN disconnected.
Rousette keeps crashing
The system booted with WAN and LAN connected.
Rousette starts and responds to queries.
Expected Behavior
Rousette starts and responds to queries.
Steps To Reproduce
load v24.10.1
unplug LAN
reboot
check log
Additional information
Factory configuration
The text was updated successfully, but these errors were encountered: