Comments (11)
the most flexible solution is probably to ignore the comment in the parsing:
$ cat /etc/resolv.conf
domain getinternet.no
search getinternet.no
nameserver 10.0.1.1
nameserver 10.0.1.2 # here is a comment
from re.
Can you try the git version: https://github.com/baresip/baresip/wiki/Install:-GIT-Version
from re.
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.
from re.
You can try make HAVE_RESOLV=1
for libre stable.
from re.
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?
[1] https://cvsweb.openbsd.org/ports/telephony/baresip/
from re.
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):
/netstat
...
DNS Servers from System: (2)
0: 10.0.0.1:53
1: [fd00:10::1]:53
Do the square brackets around the IPv6 address have any significance?
Using the unmodified re package, I get the following instead:
/netstat
...
ns: sa_set: 10.0.0.1 # resolvd: em0 (Invalid argument)
ns: sa_set: fd00:10::1 # resolvd: em0 (Invalid argument)
DNS Servers from System: (0)
Again, I'm not sure if this is the best option, but it seems to work. Would you recommend another solution?
from re.
Yes I think we should improve the parse_resolv_conf
for comments, but I still wonder why HAVE_RESOLV is not used, it should be the preferred method. @borosai could you test the GIT Version? I will move the issue to https://github.com/baresip/re
from re.
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.
from re.
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.
from re.
Sorry fo the delay. What compiler do you use? I just realized OpenBSD has a modificated/old gcc as system compiler:
man gcc-local
gcc does not search under /usr/local for include files nor for libraries: as a system compiler, it only searches the system paths by default.
You can try:
gmake CC=clang
from re.
No problem. OpenBSD switched the system compiler to clang back in 2017.
$ clang --version
OpenBSD clang version 13.0.0
from re.
Related Issues (20)
- HAVE_THREADS and Visual Studio 2022, version 17.8 HOT 2
- retest test_unixsock fails, bind(): Operation not permitted
- Easy fix for retest test_unixsock fail, bind(): Operation not permitted HOT 2
- vconv: The problem of byte alignment in YUV conversion HOT 4
- 100rel broken in 2 ways HOT 3
- Sec-WebSocket-Protocol header missing in Upgrade response HOT 5
- websocket connection gets closed after a few seconds
- ice_connchk_h gets called multiple times HOT 1
- websocket messages should be sent as text instead of binary HOT 3
- BYE is not sent for calls over websocket HOT 1
- sip/transp: websock_accept proto is missing
- Mingw warnings HOT 4
- vidmix: looks like new locking produces a potential deadlock HOT 2
- An error occurred when compiling baresip-libre with vcpkg HOT 2
- mingw cmake 3.27 openssl HOT 2
- re v3.5.0 build on Debian 12 fails
- debian version in debian/changelog has not been updated HOT 1
- no AI_V4MAPPED define on OpenBSD HOT 1
- async_work: worker callback is called twice HOT 14
- there is some question in vidmix and need help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re.