]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Strip neighbors's description to 20 chars in show bgp summary 7676/head
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Fri, 4 Dec 2020 13:04:09 +0000 (15:04 +0200)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 17 Dec 2020 08:06:35 +0000 (10:06 +0200)
commitcb75bb31732e29c990563f33335ca1a9357007ea
treecd78ce3c5dec497c1b476818adadf1870311cb0e
parent91653aefd487fb35ffca8f2d8db35b8c2b03fd6c
bgpd: Strip neighbors's description to 20 chars in show bgp summary

Also make sure we do not show descriptions with whitespace characters, just
take the first splitted by whitespace.

```
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep description
 neighbor 192.168.0.2 description 12346789012345678901234567890
root@exit1-debian-9:~/frr# vtysh -c 'show ip bgp summary' | grep 192.168.0.2
192.168.0.2     4      65030         0         0        0    0    0    never Idle (Admin)        0 1234678901234567890
```

```
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep description
 neighbor 192.168.0.2 description one two
root@exit1-debian-9:~/frr# vtysh -c 'show ip bgp summary' | grep 192.168.0.2
192.168.0.2     4      65030         0         0        0    0    0    never Idle (Admin)        0 one
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
bgpd/bgp_vty.c