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

Drop udp packets from unknown hosts #4

Merged
merged 1 commit into from
May 31, 2022

Conversation

rtitmuss
Copy link

Check that incoming udp packets have been sent from the system
running nibegw, otherwise drop the packets.

Check that incoming udp packets have been sent from the system
running nibegw, otherwise drop the packets.
@yozik04
Copy link
Owner

yozik04 commented May 31, 2022

I used that hole during development as I was replaying UDP traffic to the lib. Now it is ok to fix =)

@yozik04 yozik04 merged commit 566e793 into yozik04:master May 31, 2022
@rtitmuss
Copy link
Author

rtitmuss commented Jun 1, 2022

Unfortunately this is a problem running in a Docker container in Hassio. In the docker container the source address for the UDP packet is on a virtual address (starting 172), see moby/libnetwork#1994.

This can be worked around by enabling host networking in the container (host_network: true in config.yaml), but that seems less secure. It might be better to revert this PR or make this configurable in some way. What do you think?

Longer term I might look at changing nibe_gw to support modbus_tcp, to remove the dependency on UDP.

@yozik04
Copy link
Owner

yozik04 commented Jun 1, 2022

Ahh. I thought you have tested it already.
I required nibegw approach because I migrated from openhab. That was a smooth migration sensor by sensor. I was multiplexing udp packets to multiple ports.

@rtitmuss
Copy link
Author

rtitmuss commented Jun 1, 2022 via email

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

Successfully merging this pull request may close these issues.

None yet

2 participants