]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lib: accept "language" as a valid MED location type
authorVincent Bernat <vincent@bernat.im>
Fri, 7 Aug 2015 09:02:09 +0000 (11:02 +0200)
committerVincent Bernat <vincent@bernat.im>
Fri, 7 Aug 2015 09:02:51 +0000 (11:02 +0200)
Closes #127

NEWS
src/lib/atoms/med.c
tests/lldpcli.conf

diff --git a/NEWS b/NEWS
index ce748c0e7a713950c55db186294b85e94e762fe8..52e8ca0d27c1258e65733f21818bc2a51b01cd0e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ lldpd (0.7.16)
       information.
   * Fix:
     + Fix build on OS X.
+    + Accept "language" when configuring MED location as a civic address.
 
 lldpd (0.7.15)
   * Features:
index 305bd55c771e0d13b1c1cddaf81e2adedfa2cbe5..45ee2e2f323f9c6c6034d8c2ef7d7f4e5bc13561 100644 (file)
@@ -825,7 +825,7 @@ _lldpctl_atom_set_int_med_caelement(lldpctl_atom_t *atom, lldpctl_key_t key,
 
        switch (key) {
        case lldpctl_k_med_civicaddress_type:
-               if (value <= 0 || value > 128) goto bad;
+               if (value < 0 || value > 128) goto bad;
                el->type = value;
                return atom;
        default:
index 29c3173165203826e987fe634a96d76e9da7b23b..aa63f0728abb56ae207b8900806ae6dfc71f26d2 100644 (file)
@@ -38,7 +38,7 @@ configure med fast-start enable
 configure med fast-start tx-interval 3
 unconfigure med fast-start
 configure med location coordinate latitude 48.58667N longitude 2.2014E altitude 117.47 m datum WGS84
-configure med location address country US street "Commercial Road" city "Roseville"
+configure med location address country US language en_US street "Commercial Road" city "Roseville"
 configure med location elin 911
 configure ports eth0 med location elin 911
 configure med policy application voice vlan 500 priority voice dscp 46