]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: update nixpkgs
authorVincent Bernat <vincent@bernat.ch>
Sun, 15 Oct 2023 18:19:57 +0000 (20:19 +0200)
committerVincent Bernat <vincent@bernat.ch>
Sun, 15 Oct 2023 18:19:57 +0000 (20:19 +0200)
flake.lock
flake.nix
src/daemon/protocols/lldp.c

index 4bde8dcae4ff4fb6de42974eb61c8b44f45c851e..fef0c7ea6839e316e2ba3a117397b9fcbaddb8e1 100644 (file)
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1659606041,
-        "narHash": "sha256-W4/u2ssr3fS4XOtltrsDD9w2kF4jYYZr6JyPGUW2jdI=",
+        "lastModified": 1697009197,
+        "narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "5f9b871b72b24f066b1a1e189efd0669f2888c49",
+        "rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54",
         "type": "github"
       },
       "original": {
index f4ec55795b11454df6d98f828bebae1741f5074d..9a18cd3b1f707c9fe8e1e5c9ca496aa46c61764f 100644 (file)
--- a/flake.nix
+++ b/flake.nix
@@ -25,7 +25,7 @@
             "--with-systemdsystemunitdir=\${out}/lib/systemd/system"
           ];
 
-          nativeBuildInputs = with pkgs; [ pkgconfig autoreconfHook git check ];
+          nativeBuildInputs = with pkgs; [ pkg-config autoreconfHook git check ];
           buildInputs = with pkgs; [ libevent readline net-snmp openssl ];
           outputs = [ "out" "dev" "man" "doc" ];
         };
index 03b6b6806b691bd776432b443362806663887cf1..647c6e970aab64912ae260d89374cc39aca9a2ed 100644 (file)
@@ -323,14 +323,13 @@ _lldp_send(struct lldpd *global, struct lldpd_hardware *hardware, u_int8_t c_id_
 
                /* LLDP-MED inventory */
 #  define LLDP_INVENTORY(value, subtype)                                         \
-         if (value) {                                                           \
-                 if (!(POKE_START_LLDP_TLV(LLDP_TLV_ORG) &&                     \
-                         POKE_BYTES(med, sizeof(med)) && POKE_UINT8(subtype) && \
-                         POKE_BYTES(value,                                      \
-                             (strlen(value) > 32) ? 32 : strlen(value)) &&      \
-                         POKE_END_LLDP_TLV))                                    \
-                         goto toobig;                                           \
-         }
+    if (value) {                                                                 \
+      if (!(POKE_START_LLDP_TLV(LLDP_TLV_ORG) && POKE_BYTES(med, sizeof(med)) && \
+             POKE_UINT8(subtype) &&                                             \
+             POKE_BYTES(value, (strlen(value) > 32) ? 32 : strlen(value)) &&    \
+             POKE_END_LLDP_TLV))                                                \
+       goto toobig;                                                             \
+    }
 
                if (port->p_med_cap_enabled & LLDP_MED_CAP_IV) {
                        LLDP_INVENTORY(chassis->c_med_hw, LLDP_TLV_MED_IV_HW);
@@ -552,22 +551,20 @@ lldp_send(struct lldpd *global, struct lldpd_hardware *hardware)
        return 0;
 }
 
-#define CHECK_TLV_SIZE(x, name)                                                 \
-       do {                                                                    \
-               if (tlv_size < (x)) {                                           \
-                       log_warnx("lldp", name " TLV too short received on %s", \
-                           hardware->h_ifname);                                \
-                       goto malformed;                                         \
-               }                                                               \
-       } while (0)
-#define CHECK_TLV_MAX_SIZE(x, name)                                             \
-       do {                                                                    \
-               if (tlv_size > (x)) {                                           \
-                       log_warnx("lldp", name " TLV too large received on %s", \
-                           hardware->h_ifname);                                \
-                       goto malformed;                                         \
-               }                                                               \
-       } while (0)
+#define CHECK_TLV_SIZE(x, name)                                                    \
+  do {                                                                             \
+    if (tlv_size < (x)) {                                                          \
+      log_warnx("lldp", name " TLV too short received on %s", hardware->h_ifname); \
+      goto malformed;                                                              \
+    }                                                                              \
+  } while (0)
+#define CHECK_TLV_MAX_SIZE(x, name)                                                \
+  do {                                                                             \
+    if (tlv_size > (x)) {                                                          \
+      log_warnx("lldp", name " TLV too large received on %s", hardware->h_ifname); \
+      goto malformed;                                                              \
+    }                                                                              \
+  } while (0)
 
 int
 lldp_decode(struct lldpd *cfg, char *frame, int s, struct lldpd_hardware *hardware,