Skip to content
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

Mosquitto client use Ethernet interface instead of loopback interface #2774

Open
hasaafi opened this issue Mar 24, 2023 · 4 comments
Open

Mosquitto client use Ethernet interface instead of loopback interface #2774

hasaafi opened this issue Mar 24, 2023 · 4 comments

Comments

@hasaafi
Copy link

hasaafi commented Mar 24, 2023

With the version 1.4.14 i found that when :

  • 1/ plugged ethernet ( between embedded device and pc ) no need for internet or any connectivity just plugged in the ethernet cable.

  • 2/ run mosquitto localy and in loopback :
    - mosquitto with the default config : mosquitto -c /etc/mosquitto/mosquitto.conf -v -d
    - mosquitto_sub -h localhost -t topic/message &
    - mosquitto_pub -h localhost -m "hello" -t topic/message -d

-3/ unplugged ethernet.

=> Result : messages are buffered only when the ethernet is plugged.
if i unplugged the ethernet messages are not buffered
As soon as I plugged in the ethernet again, the messages are sent all at once.

when i check the mosquitto log, I found that the client use the IP of ethernet interface .

I tested with 1.5.8 version the problem is not seen . because they use the right interface( loopback interface) . which commit that fix this issue ?

@hasaafi
Copy link
Author

hasaafi commented Mar 27, 2023

any help ?

@hasaafi
Copy link
Author

hasaafi commented Mar 28, 2023

again

@hasaafi hasaafi changed the title Local mosquitto broker stops publishing messages if ethernet cable is unplugged Mosquitto client use Ethernet interface instead of loopback interface Mar 29, 2023
@ralight
Copy link
Contributor

ralight commented Apr 1, 2023

I don't know. If this is important to you, you could run git bisect to find the commit.

@hasaafi
Copy link
Author

hasaafi commented Apr 3, 2023

the problem here that i use an old bsp : linux 3.10 so i can't test commits between this 2 version , mosquitto need dependencies so with the newest version i can't run it on my bsp.
I think that fixed in lib/net_mosq.c when they try to fixing another problem , but i can't find the commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants