Changeset 2245


Ignore:
Timestamp:
Dec 24, 2012, 12:10:27 PM (6 years ago)
Author:
matthijs
Message:

dnsmasq: Don't send DHCP packets to ignored interfaces.

When starting up, the RestartDnsmasq? script sends a DHCP packet to the interface it will
be listening on, to make sure that there is not already a DHCP server
running on the network.

However, it would also do this for interfaces which are configured to be
ignored by dnsmasq. This caused a DHCPDISCOVER packet to be sent out on
the wan interface during startup, for no good reason.

Closes: #619

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fon/dnsmasq-fon/files/etc/fonstated/RestartDnsmasq

    r1905 r2245  
    217217        [ -n "$netmask" ] || config_get netmask "$net" netmask
    218218
    219         #check for an already active dhcp server on the interface, unless 'force' is set
     219
     220        # check for an already active dhcp server on the interface,
     221        # unless 'force' or ignore is set
    220222        config_get_bool force "$cfg" force 0
    221         [ "$force" -gt 0 ] || {
     223        config_get_bool ignore "$cfg" ignore
     224        [ "$force" -gt 0 ] || [ "$ignore" -gt 0 ] || {
    222225                udhcpc -n -q -R -s /bin/true -t 1 -i $ifname >&- && return 0
    223226        }
Note: See TracChangeset for help on using the changeset viewer.