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

Problems running on Linux #93

Open
cuican6 opened this issue Dec 7, 2021 · 3 comments
Open

Problems running on Linux #93

cuican6 opened this issue Dec 7, 2021 · 3 comments

Comments

@cuican6
Copy link

cuican6 commented Dec 7, 2021

hi . sometimes, networkcard in linux has two or more ipaddr, but in bacnet =>BacnetIpUdpProtocolTransport.cs=>GetAddressDefaultInterface method,two or more ipaddress is bad, in my submission,there canbe write return unicastAddresses.Length >= 1
? unicastAddresses.First()
: null;
sir,tell me my proposal is correct?
other,i binding ip in bacnetclient, BacnetClient client = new BacnetClient(.....,"192.168.1.200");in this ,i send whois ,can't receive response , no event of oniam trigger, but i confirm the package of whois has send, the other client (don't bind ip) has received message of i am.
think you.

@cuican6
Copy link
Author

cuican6 commented Dec 7, 2021

thank you

@pocketbroadcast
Copy link

Yes, I can confirm, this is a problem.

If there are multiple ip addresses configured for a single device the condition evaluates to false and the result is null as if there was no interface at all.

In case of multiple ip addresses configured, which one should be chosen?
Any comments?

Nevertheless, resolving the default ip address is only used when we bind to any interface -> 0.0.0.0
-> imho if there are multiple ip addresses / subnets available this option is dangerous by default.

@gralin
Copy link
Member

gralin commented Mar 1, 2022

Thank you @cuican6 for reporting and @pocketbroadcast for checking this. It seems this address is only used to guess the correct broadcast address in case there is only one available interface address, otherwise it should return null so that default broadcast address is used. The original YABE code still has the same logic.

@pocketbroadcast I've added a suggestion for your PR

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

3 participants