-
Notifications
You must be signed in to change notification settings - Fork 83
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
ns: sa_set: ... (Invalid argument) messages during startup #187
Comments
Can you try the git version: https://github.com/baresip/baresip/wiki/Install:-GIT-Version |
Sure, I can give it a shot. By the way, is there a specific change after v1.1.0 that I would be testing? I'm just wondering if it would be simpler to patch the OpenBSD port (locally, for testing), or to apply OpenBSD's patches to my own build using your instructions. |
You can try |
I modified and built OpenBSD's re port with your recommendation, and after rebuilding baresip as well, the messages still appear. I looked at the rest of the baresip port [1], and noticed that HAVE_RESOLV appears to be set already (Makefile.inc), but I haven't worked much with ports so I may be wrong. If you want, I could ask about this package on the OpenBSD ports mailing list, and get back to you with more accurate information. Also, I was looking at re's source code to try to understand what's going on, and the parse_resolv_conf function in /src/dns/ns.c appears to be the default method, correct? If it is indeed having issues parsing the new nameserver lines, would modifying that to ignore everything after the address (second field) be an option? |
I was curious, so I decided to do some additional testing. I changed the regex string on line 64 in /src/dns/ns.c from "nameserver [^\n]+" to "nameserver [^ ]+", like the strings for domain and search parsing. Could this introduce any issues I haven't considered? Anyway, after building the patched re package, and running baresip, the messages are gone and /netstat displays the following (shortened version):
Do the square brackets around the IPv6 address have any significance? Using the unmodified re package, I get the following instead:
Again, I'm not sure if this is the best option, but it seems to work. Would you recommend another solution? |
the most flexible solution is probably to ignore the comment in the parsing:
|
Yes I think we should improve the |
I will try to test the Git version this weekend, but it may take a bit longer. Regardless, improving the way comments are handled seems like a positive change. |
I just finished testing the Git versions of baresip, re, and rem. Unfortunately I'm still seeing the same messages. If you're up to it, I can only recommend visiting the CVS link I posted above, where you can look for any changes introduced in the OpenBSD port (Makefiles, patches, etc.) that could be affecting the expected behavior. I don't know what to look for, so I wouldn't be much help with that. |
Sorry fo the delay. What compiler do you use? I just realized OpenBSD has a modificated/old gcc as system compiler: man gcc-local
You can try:
|
No problem. OpenBSD switched the system compiler to clang back in 2017.
|
Hello. I'm attempting to configure baresip v1.1.0 on my OpenBSD-current system. The last time I used baresip was a few years ago, and I don't recall seeing the following messages (or something similar) printed while starting up the program.
ns: sa_set: 10.0.0.1 # resolvd: em0 (Invalid argument)
ns: sa_set: fd00:10::1 # resolvd: em0 (Invalid argument)
Earlier this year, OpenBSD introduced resolvd(8) [1], and as a result, the nameserver entries in /etc/resolv.conf are now formatted by resolvd as follows:
nameserver 10.0.0.1 # resolvd: em0
nameserver fd00:10::1 # resolvd: em0
I wasn't able to confirm this on my own, so I just wanted to check if the addition of "# resolvd: em0" to the nameserver entries is possibly causing this message/issue.
[1] https://man.openbsd.org/resolvd
The text was updated successfully, but these errors were encountered: