Skip to content

systemd-networkd should call IFF_UP on dummy interfaces #12051

@chr4

Description

@chr4

Is your feature request related to a problem? Please describe.

When creating a dummy interface in systemd-networkd, e.g. by creating /lib/systemd/network/90-dummy.netdev with this content:

[NetDev]
Name=dummy0
Kind=dummy

The interface status is DOWN

`: dmmy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 5a:b0:9e:dd:2a:cf brd ff:ff:ff:ff:ff:ff

Some services do not work with DOWN interfaces. For example, keepalived automatically goes to the FAIL state, if it detects a managed interface is DOWN.

Describe the solution you'd like

While the interface state UP doesn't seem to be implemented, IFF_UP should be called regardless, which would put the interface in the UNKNOWN state.

I suppose this could be done by implementing a netdev_dummy_post_create() function in src/network/netdev/dummy.c, analogue to src/network/netdev/bridge.c and call the following:

sd_rtnl_message_link_set_flags(m, IFF_UP, IFF_UP)
netlink_call_async()

Describe alternatives you've considered

The root cause why I've tried using a dummy interface as a workaround is described in #12050

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions