Closed jlopezr closed 1 year ago
Same issue here upon installing with cargo.
On Manjaro 5.15
Same issue here, also installed with cargo on Ubuntu 22.04LTS.
I've run into this while fixing the build on Void Linux. The old binary from our repos still works just fine, the new one doesn't. The only things that changed between then:
socket2
library, because it wouldn't build on Rust 1.64+ otherwiseI've got https://pastebin.com/A8bJuafj and https://pastebin.com/aKLfRb9Z, which are strace logs from both of the binaries. The first one is the broken one, the second is the older, working binary.
The critical bit seems to be the setsockopt
syscall, which is the one that fails, that is being called with slightly different parameters now:
diff --git a/old b/new
index 479c50e..69c3a0f 100644
--- a/old
+++ b/new
@@ -1 +1 @@
-setsockopt(3, SOL_PACKET, PACKET_ADD_MEMBERSHIP, {mr_ifindex=if_nametoindex("lo"), mr_type=PACKET_MR_PROMISC, mr_alen=0, mr_address=ff:ff:ff:ff:ff:ff}, 16) = 0
+setsockopt(3, SOL_PACKET, PACKET_ADD_MEMBERSHIP, {mr_ifindex=0, mr_type=PACKET_MR_MULTICAST, mr_alen=0, mr_address=ff:ff:ff:ff:ff:ff}, 16) = -1 ENODEV (No such device)
I haven't gotten any further yet, but maybe this motivates someone else to take a deeper look here :)
Sounds like https://github.com/rust-lang/rust/pull/78802 to me
That's the build issue resolved by updating socket2
, but apparently there's more libraries in bandwhich
's dependency tree that relied on this behaviour: mio
relied on that behaviour prior to version 0.7.6
as well. mio
is in the dependency tree twice, once in version 0.6.21
, brought in by tokio@0.2.2
, and once in version 0.7.0
brought in by crossterm
. I think the big task here is migrating tokio
to the stable release, bringing up mio
as well. Whether that's actually related though, I'm not sure. No such device
sounds like a different problem to me.
I'll be opening a PR later with the dependencies upgraded, but I can already report some success: With pnet
ugpraded, it works again.
same on ubuntu 23.04
After doing
git remote add jcgruenhage https://github.com/jcgruenhage/bandwhich
git fetch jcgruenhage
git checkout upgrades-2023-04-11
I was able to do
cargo build
succesfully.
I have try downgrade rust version to 1.62.1 and rebuild, bandwhich run succesfully.
Is this project still active?
This should be fixed in #273. See also #275.
Hi!
I am having problems with bandwhich compiled by myself.
On the other hand, the binary version available on github is working perfectly. The same error happens in Linux x64 and Linux armv7 that I crosscompiled.