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

dnsmasq fails to start if OMR-Bypass creates config lines over 1024 characters long #3242

Closed
SpectroHA opened this issue Apr 2, 2024 · 2 comments
Assignees
Labels

Comments

@SpectroHA
Copy link

Expected Behavior

Entries in OMR-Bypass should not be able to interfere with other critical services running

Current Behavior

Entires in OMR-Bypass result in updates to /var/etc/dnsmasq.conf.cfg###### where I suspect the # characters will be different for different installations. In my installation the full filename is dnsmasq.conf.cfg01411c. The updates look to be lines that begin with "nftset=" I have found that if enough entries are added in OMR-Bypass such that one of these lines (inclusive of nftset=) exceeds 1024 characters then dnsmasq will fail to start with errors like thie following
Apr 2 15:50:08 OpenMPTCProuter daemon.err dnsmasq[1]: nftset inet fw4 omr_dst_bypass_eth1_4 Error: No such file or directory Apr 2 15:50:08 OpenMPTCProuter user.notice firewall.omr-server: Firewall reload, set server part firewall reloading Apr 2 15:50:09 OpenMPTCProuter user.notice omr-bypass: Restart dnsmasq... Apr 2 15:50:09 OpenMPTCProuter daemon.info dnsmasq[1]: exiting on receipt of SIGTERM Apr 2 15:50:09 OpenMPTCProuter user.notice omr-bypass: OMR-ByPass is running Apr 2 15:50:09 OpenMPTCProuter daemon.crit dnsmasq[1]: bad option at line 48 of /var/etc/dnsmasq.conf.cfg01411c Apr 2 15:50:09 OpenMPTCProuter daemon.crit dnsmasq[1]: FAILED to start up Apr 2 15:50:14 OpenMPTCProuter user.notice omr-schedule-010-services: Set firewall on server vps Apr 2 15:50:14 OpenMPTCProuter daemon.crit dnsmasq[1]: bad option at line 48 of /var/etc/dnsmasq.conf.cfg01411c Apr 2 15:50:14 OpenMPTCProuter daemon.crit dnsmasq[1]: FAILED to start up Apr 2 15:50:19 OpenMPTCProuter daemon.crit dnsmasq[1]: bad option at line 48 of /var/etc/dnsmasq.conf.cfg01411c Apr 2 15:50:19 OpenMPTCProuter daemon.crit dnsmasq[1]: FAILED to start up

Possible Solution

I think there's significance to the fact that this occurs when a line exceeds 1024 characters, since that is a clean cutoff at 2^10

Steps to Reproduce the Problem

  1. start monitoring DNS i.e. 'watch nslookup yahoo.com 192.168.100.1'
  2. Making sure to configure for the same interface (specified or unspecified), add the following protocols/services in OMR-Bypass: amazonvideo, disneyplus, hulu, netflix, teams, apple
  3. monitor dnsmasq config i.e. 'watch tail dnsmasq.conf.cfg01411c'
  4. Observe DNS queries will being to fail when the nftset= line is modified with the above protocols/services
  5. See syslog that dnsmasq failed to start

Context (Environment)

The issue is that this breaks DNS on OMR, but using OMR as DNS provider is necessary for OMR-Bypass to work.

Specifications

  • OpenMPTCProuter version: 0.60rc2-6.1
  • OpenMPTCProuter VPS version: 0.1029-test 6.1.0-18-cloud-amd64
  • OpenMPTCProuter VPS provider: OVHCloud
  • OpenMPTCProuter platform: x86_64) virtual machine
  • Country: USA
@SpectroHA SpectroHA added the bug label Apr 2, 2024
@Ysurac Ysurac self-assigned this Apr 2, 2024
@Ysurac Ysurac closed this as completed in e0356e8 Apr 2, 2024
@Ysurac
Copy link
Owner

Ysurac commented Apr 2, 2024

This is fixed now, will be in next snapshot image.

@SpectroHA
Copy link
Author

That was fast! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants