]> git.ipfire.org Git - thirdparty/lldpd.git/commit
Fix key/value output was incorrect when an interface name contains a dot.
authorVincent Bernat <bernat@luffy.cx>
Wed, 7 Sep 2011 09:07:29 +0000 (11:07 +0200)
committerVincent Bernat <bernat@luffy.cx>
Wed, 7 Sep 2011 09:07:29 +0000 (11:07 +0200)
commit84e06882c89cab7d5782700565a332ef81ccbbf3
tree4180fef81177e196343823d2dfc8b79ce00bda84
parente1933880be0db7a882ee350d3a0f951682abcf97
Fix key/value output was incorrect when an interface name contains a dot.

When a dot was present in an interface name, the output of `lldpctl -f
keyvalue` was incorrect with something like this:

    lldp.vif2.vif4.vif5.vif6.vif7.0.via=LLDP
    lldp.vif2.vif4.vif5.vif6.vif7.0.rid=2

We fix this by using `\1` as a separator instead of `.` when building
the key. `\1` is replaced by `.` before printing.

When parsing the output, the interface name should be determined from
the first time it is used in a line like `lldp.vif2.0.via=LLDP`.
CHANGELOG
src/kv_writer.c