Skip to content

siproxd: l3_device only set when interface up problem #860

@noguxx

Description

@noguxx

network_get_device $1 $2 || network_get_physdev $1 $2

For interfaces with physical devices like eth0, eth1... the layer 2 device is set even if the interface is down, but for the rest to have a l3_device set, the interface needs to be up.
I don't know if this is always true, but perhaps when interface fails layer 2, then the interface name is equal to l3_device.

Where is : network_get_device $1 $2 || network_get_physdev $1 $2
Suggest 1: network_get_physdev $1 $2 || eval $1=$2
Suggest 2 (wait interface up): network_get_physdev $1 $2 || for i in $(seq 1 10); do network_flush_cache; network_get_device $1 $2 && break || ([ $i -eq 10 ] && eval $1=$2 || sleep 2); done

This could be a possible fix for #855

Notify maintainer: @guidosarducci

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions