]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interfaces: replace "bonded" by "enslaved"
authorVincent Bernat <vincent@bernat.im>
Sun, 13 Mar 2016 13:37:36 +0000 (14:37 +0100)
committerVincent Bernat <vincent@bernat.im>
Sun, 13 Mar 2016 13:37:36 +0000 (14:37 +0100)
It is more in par with the appropriate terminology for bonds in Linux.

README.md
src/daemon/interfaces-linux.c
src/daemon/lldpd.c

index 81ce7c630caf191991b9c914aacad19b82d99e21..ddd30647e509e94eca393fb49dc8bb23e79e4e2c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -163,7 +163,7 @@ interfaces of the bond. In this case, lldpd will affect a received
 randomly to one of the interface (so a neighbor may be affected to the
 wrong interface).
 
-On 2.6.27, we are able to receive packets on real interface for bonded
+On 2.6.27, we are able to receive packets on real interface for enslaved
 devices. This allows one to get neighbor information on active/backup
 bonds. Without the 2.6.27, lldpd won't receive any information on
 inactive slaves. Here are the patchs (thanks to Joe Eykholt):
index 6ceddaa3de546cd7c78fd018b171ef468858b03e..be4668f703bd2bfa59d333ac98dcd2703b1f5b2f 100644 (file)
@@ -438,7 +438,7 @@ iface_bond_init(struct lldpd *cfg, struct lldpd_hardware *hardware)
 
        if (!master) return -1;
 
-       log_debug("interfaces", "initialize bonded device %s",
+       log_debug("interfaces", "initialize enslaved device %s",
            hardware->h_ifname);
 
        /* First, we get a socket to the raw physical interface */
@@ -449,7 +449,7 @@ iface_bond_init(struct lldpd *cfg, struct lldpd_hardware *hardware)
        interfaces_setup_multicast(cfg, hardware->h_ifname, 0);
 
        /* Then, we open a raw interface for the master */
-       log_debug("interfaces", "bonded device %s has master %s(%d)",
+       log_debug("interfaces", "enslaved device %s has master %s(%d)",
            hardware->h_ifname, master->name, master->index);
        if ((fd = priv_iface_init(master->index, master->name)) == -1) {
                close(hardware->h_sendfd);
@@ -485,7 +485,7 @@ iface_bond_recv(struct lldpd *cfg, struct lldpd_hardware *hardware,
        socklen_t fromlen;
        struct bond_master *master = hardware->h_data;
 
-       log_debug("interfaces", "receive PDU from bonded device %s",
+       log_debug("interfaces", "receive PDU from enslaved device %s",
            hardware->h_ifname);
        fromlen = sizeof(from);
        if ((n = recvfrom(fd, buffer, size, 0,
@@ -516,7 +516,7 @@ static int
 iface_bond_close(struct lldpd *cfg, struct lldpd_hardware *hardware)
 {
        struct bond_master *master = hardware->h_data;
-       log_debug("interfaces", "closing bonded device %s",
+       log_debug("interfaces", "closing enslaved device %s",
            hardware->h_ifname);
        interfaces_setup_multicast(cfg, hardware->h_ifname, 1);
        interfaces_setup_multicast(cfg, master->name, 1);
@@ -543,7 +543,7 @@ iflinux_handle_bond(struct lldpd *cfg, struct interfaces_device_list *interfaces
                if (!iface->upper || !(iface->upper->type & IFACE_BOND_T)) continue;
 
                master = iface->upper;
-               log_debug("interfaces", "%s is an acceptable bonded device (master=%s)",
+               log_debug("interfaces", "%s is an acceptable enslaved device (master=%s)",
                    iface->name, master->name);
                if ((hardware = lldpd_get_hardware(cfg,
                            iface->name,
index 3b35534b9348668ee0bf18c0b7d9bfa924e369d8..1f90867f6f4ee86e9ffe82e6f2d23e0a23c231e8 100644 (file)
@@ -425,9 +425,10 @@ lldpd_cleanup(struct lldpd *cfg)
                        TAILQ_REMOVE(&cfg->g_hardware, hardware, h_entries);
                        lldpd_remote_cleanup(hardware, notify_clients_deletion, 1);
                        lldpd_hardware_cleanup(cfg, hardware);
-               } else
+               } else {
                        lldpd_remote_cleanup(hardware, notify_clients_deletion,
                            !(hardware->h_flags & IFF_RUNNING));
+               }
        }
 
        levent_schedule_cleanup(cfg);