Package: ifupdown-ng
Version: Version: 0.12.1-7
Severity: normal

An interface with only "vrf-table" set fails to come up:

    auto vrf-alpha
    iface vrf-alpha
        vrf-table 103

ifup -v ends with:

    ifupdown: vrf-alpha: attempting to run vrf executor for phase pre-up
    + [ -n  ]
    ifup: failed to change interface vrf-alpha state to 'up'

In /usr/libexec/ifupdown-ng/vrf the pre-up branch is:

    [ -n "$IF_VRF_MEMBER" ] && handle_member

For a VRF device, IF_VRF_MEMBER is empty, so the test returns 1 and
that becomes the script's exit status. Replacing it with

    if [ -n "$IF_VRF_MEMBER" ]; then handle_member; fi

makes ifup succeed.

Related: the create phase is not idempotent. If the device and rules
already exist (e.g. after a failed ifup), "ip link add" and "ip rule add"
fail with "File exists", and the exit status of the last "ip rule add"
fails the phase.

Reply via email to