Opened 15 years ago

Closed 15 years ago

#21322 closed enhancement (fixed)

[dnsmasq] [2.50] Add variants to disable DHCP, TFTP, and the IPV6 features

Reported by: hiram@… Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: atma@…
Port: dnsmasq

Description (last modified by mf2k (Frank Schima))

Several default features in dnsmasq can be disabled with compiler options.

I have created a patch which adds variants for these. The patch also includes a fix for ticket:21276

Attachments (1)

Portfile.patch (3.3 KB) - added by hiram@… 15 years ago.
Patch against the 2.50 Portfile

Download all attachments as: .zip

Change History (7)

Changed 15 years ago by hiram@…

Attachment: Portfile.patch added

Patch against the 2.50 Portfile

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Description: modified (diff)
Owner: changed from macports-tickets@… to snc@…
Version: 1.8.0

comment:2 Changed 15 years ago by nerdling (Jeremy Lavergne)

Status: newassigned

Thanks for the patch.

Rather than having the entire plist in the Portfile, I'll add it to files/ and do reinplaces on it.

comment:3 Changed 15 years ago by atma@…

Hello fellow geeks,

I've lost several hours trying to make dnsmasq work using launchd at start but apparently I was not able too. I use (as everyone should I think) the /opt/local/etc/dnsmasq.conf file for dnsmasq configuration. Most people I think that will not be satisfied by cli arguments on dnsmasq. So here is my .plist:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-Apple ComputerDTD PLIST 1.0EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>

<key>KeepAlive</key> <false/> <key>Label</key> <string>org.macports.dnsmasq</string> <key>ProgramArguments</key> <array>

<string>/opt/local/sbin/dnsmasq</string> <string>-d</string> <string>-8</string> <string>/dev/null</string> <string>-f</string> <string>/opt/local/etc/dnsmasq</string>

</array> <key>RunAtLoad</key> <true/>

</dict> </plist>

When launchctl tries to start it at boot time gets the following error: Oct 11 17:22:43 localhost dnsmasq[30]: unknown interface en0 Oct 11 17:22:43 localhost dnsmasq[30]: FAILED to start up Oct 11 17:22:43 localhost launchd: org.macports.dnsmasq: exited with exit code: 2 Oct 11 17:22:43 localhost launchd: org.macports.dnsmasq: 9 more failures without living at least 60 seconds will cause job removal

which is ... hard to understand after all:

devo:~ root# ifconfig <snip> en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500

inet6 fe80::211:24ff:fe76:7e9e%en0 prefixlen 64 scopeid 0x4 inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255 ether 00:11:24:76:7e:9e media: autoselect (100baseTX <full-duplex>) status: active supported media: none autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback>

</snip>

This system is running Tiger 10.4.11 and latest macports. The patch of course was applied (you can see this from the plist file, it does not call for other files... as the previous version).

Maybe this is okay under Snow Leopard and/or Leopard but tiger still has issues. Any ideas on this?

comment:4 Changed 15 years ago by atma@…

Cc: atma@… added

Cc Me!

comment:5 in reply to:  3 Changed 15 years ago by perette (Perette Barella)

The "unknown interface en0" sounds like a race condition that dnsmasq is starting before the network is up. In the solution over at http://trac.macports.org/ticket/21276 , the plist included the following:

<dict>

<key>NetworkState</key><true/>

</dict>

Which should tell launchd that dnsmasq should only be launched when the net is up.

comment:6 Changed 15 years ago by nerdling (Jeremy Lavergne)

Resolution: fixed
Status: assignedclosed

Added our own launchd script and the optional variants in r60204.

Note: See TracTickets for help on using tickets.