[systemd-devel] [PATCH v4] Added support for Uplink Failure Detection using BindCarrier
Rauta, Alin
alin.rauta at intel.com
Wed Feb 18 01:32:53 PST 2015
Hi Andrei,
> This means if link was administratively down it will be reactivated again
>
> ip link set dev down-link down
> unplug up-link
> plug up-link
>
> down-link is now up. Is it intentional?
At the time you issue "plug up-link" you don't know if the down-link is down due to " ip link set dev down-link down" or " unplug up-link ".
Since the carrier of the down-link is bound to the up-link, any change in up-link state (up & down) is propagated to the down-link, but to answer your question I have no strong opinion for or against this behaviour.
Best Regards,
Alin
-----Original Message-----
From: Andrei Borzenkov [mailto:arvidjaar at gmail.com]
Sent: Wednesday, February 18, 2015 3:43 AM
To: Rauta, Alin
Cc: teg at jklm.no; lennart at poettering.net; zbyszek at in.waw.pl; Kinsella, Ray; systemd-devel at lists.freedesktop.org
Subject: Re: [systemd-devel] [PATCH v4] Added support for Uplink Failure Detection using BindCarrier
В Tue, 17 Feb 2015 04:06:57 -0800
Alin Rauta <alin.rauta at intel.com> пишет:
> +
> +static int link_handle_bound_to_list(Link *link) {
> + Link *l;
> + Iterator i;
> + int r;
> + bool required_up = false;
> + bool link_is_up = false;
> +
> + assert(link);
> +
> + if (hashmap_isempty(link->bound_to_links))
> + return 0;
> +
> + if (link->flags & IFF_UP)
> + link_is_up = true;
> +
> + HASHMAP_FOREACH (l, link->bound_to_links, i)
> + if (link_has_carrier(l)) {
> + required_up = true;
> + break;
> + }
> +
> + if (!required_up && link_is_up) {
> + r = link_down(link);
> + if (r < 0)
> + return r;
> + } else if (required_up && !link_is_up) {
> + r = link_up(link);
> + if (r < 0)
> + return r;
> + }
> +
> + return 0;
> +}
> +
This means if link was administratively down it will be reactivated again
ip link set dev down-link down
unplug up-link
plug up-link
down-link is now up. Is it intentional?
More information about the systemd-devel
mailing list