]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Compilation fixes when disabling some part of lldpd
authorVincent Bernat <bernat@luffy.cx>
Mon, 23 Jan 2012 21:56:17 +0000 (22:56 +0100)
committerVincent Bernat <bernat@luffy.cx>
Mon, 23 Jan 2012 21:56:17 +0000 (22:56 +0100)
src/interfaces.c
src/lldp.h

index c35bc8405dda5f7e42b861135a431550939f402d..6244c3d9393f38343e0c05a0634d89dc7ef2cf03 100644 (file)
@@ -940,7 +940,6 @@ lldpd_ifh_bond(struct lldpd *cfg, struct ifaddrs *ifap)
 {
        struct ifaddrs *ifa;
        struct lldpd_hardware *hardware;
-       struct lldpd_port *port;
        int master;
        for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
                if (!iface_minimal_checks(cfg, ifa))
@@ -976,7 +975,6 @@ lldpd_ifh_bond(struct lldpd *cfg, struct ifaddrs *ifap)
                        lldpd_port_cleanup(cfg, &hardware->h_lport, 0);
                }
                
-               port = &hardware->h_lport;
                hardware->h_flags = ifa->ifa_flags;
                ifa->ifa_flags = 0;
 
@@ -988,7 +986,7 @@ lldpd_ifh_bond(struct lldpd *cfg, struct ifaddrs *ifap)
                
                /* Fill additional info */
 #ifdef ENABLE_DOT3
-               port->p_aggregid = master;
+               hardware->h_lport.p_aggregid = master;
 #endif
                iface_macphy(hardware);
                iface_mtu(cfg, hardware);
index 273cb7308f913933ad5d9c364e6dc6a032c7f80c..7f7fc723ee813cb6467f64b7e8a30bf9123677aa 100644 (file)
@@ -198,6 +198,7 @@ enum {
        LLDP_TLV_MED_IV_MODEL   = 10,
        LLDP_TLV_MED_IV_ASSET   = 11
 };
+#endif
 
 #define LLDPMED_CLASS_I 1
 #define LLDPMED_CLASS_II 2
@@ -243,6 +244,4 @@ enum {
 #define LLDPMED_CAP_MDI_PD 0x10
 #define LLDPMED_CAP_IV 0x20
 
-#endif /* ENABLE_LLDPMED */
-
 #endif /* _LLDP_H */