Page MenuHomeVyOS Platform

Disabled vif interface with "address dhcp" requests DHCP address.
Open, Requires assessmentPublicBUG

Description

If an interface is disabled and configured to request its address from a DHCP-server, the interface will still get an IP-address (at least during boot)
I would expect that the "disabled"-statement would override/disable the dhcp process.

For recreation:

 ethernet eth0 {
     .....
     vif 2 {
          address dhcp
          disable
     }
}

save the configuration and reboot

I am trying have a DHCP-interface as a backup interface only to be enabled in failure-scenarios. As of now this is not working, and the interface grabs a DHCP-address during boot.

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202003260634
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

janegil created this task.Mar 26 2020, 5:04 PM

dhclient script up this interface after hooks

/usr/sbin/dhclient-script

run_hook /etc/dhcp/dhclient-enter-hooks
run_hookdir /etc/dhcp/dhclient-enter-hooks.d

# Execute the operation
case "$reason" in

    ### DHCPv4 Handlers

    MEDIUM|ARPCHECK|ARPSEND)
        # Do nothing
        ;;
    PREINIT)
        # The DHCP client is requesting that an interface be
        # configured as required in order to send packets prior to
        # receiving an actual address. - dhclient-script(8)

        # ensure interface is up
        ip link set dev ${interface} up
pasik added a subscriber: pasik.Aug 19 2020, 7:17 PM