[systemd-devel] [PATCH v4] Added support for Uplink Failure Detection using BindCarrier

Alin Rauta alin.rauta at intel.com
Tue Feb 17 04:06:56 PST 2015


Hi,

I've creating patch v4 after addressing your comments.

I provided two APIs for networkctl command:
1. int sd_network_link_get_carrier_bound_to(int ifindex, char ***carriers);
2. int sd_network_link_get_carrier_bound_by(int ifindex, char ***carriers);

This way, only few changes were needed in "networkctl".

Only the "bound_by" links (uplinks) are monitored.
The "bound_by" map is evaluated only when the carrier is lost or gained.

When a link is added, its "bound_by" & "bound_to" maps are created.

When a link is dropped, both maps are removed.
When a link is readded, the maps are created again.

When a link is renamed, the old "bound_by" & "bound_to" maps are removed
and new ones are created taking into account the new name.

Let me know what you think,
Alin

Alin Rauta (1):
  Added support for Uplink Failure Detection using BindCarrier

 man/systemd.network.xml                  |  11 +
 src/libsystemd/sd-network/sd-network.c   |   8 +
 src/network/networkctl.c                 |  43 ++--
 src/network/networkd-link.c              | 394 +++++++++++++++++++++++++++++--
 src/network/networkd-link.h              |   3 +
 src/network/networkd-network-gperf.gperf |   1 +
 src/network/networkd-network.c           |   1 +
 src/network/networkd.h                   |   2 +-
 src/systemd/sd-network.h                 |   6 +
 9 files changed, 438 insertions(+), 31 deletions(-)

-- 
1.9.3



More information about the systemd-devel mailing list