Giter VIP home page Giter VIP logo

Comments (11)

alfredh avatar alfredh commented on August 19, 2024 1

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.

sreimers avatar sreimers commented on August 19, 2024

Can you try the git version: https://github.com/baresip/baresip/wiki/Install:-GIT-Version

from re.

borosai avatar borosai commented on August 19, 2024

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.

sreimers avatar sreimers commented on August 19, 2024

You can try make HAVE_RESOLV=1 for libre stable.

from re.

borosai avatar borosai commented on August 19, 2024

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.

borosai avatar borosai commented on August 19, 2024

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.

sreimers avatar sreimers commented on August 19, 2024

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.

borosai avatar borosai commented on August 19, 2024

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.

borosai avatar borosai commented on August 19, 2024

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.

sreimers avatar sreimers commented on August 19, 2024

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.

borosai avatar borosai commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.