From: Vincent Bernat Date: Fri, 7 Aug 2015 09:02:09 +0000 (+0200) Subject: lib: accept "language" as a valid MED location type X-Git-Tag: 0.7.16~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=451b0c3cf913d18690097dd78c0f5e62dda5d0ea;p=thirdparty%2Flldpd.git lib: accept "language" as a valid MED location type Closes #127 --- diff --git a/NEWS b/NEWS index ce748c0e..52e8ca0d 100644 --- 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: diff --git a/src/lib/atoms/med.c b/src/lib/atoms/med.c index 305bd55c..45ee2e2f 100644 --- a/src/lib/atoms/med.c +++ b/src/lib/atoms/med.c @@ -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: diff --git a/tests/lldpcli.conf b/tests/lldpcli.conf index 29c31731..aa63f072 100644 --- a/tests/lldpcli.conf +++ b/tests/lldpcli.conf @@ -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