diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-09-23 13:08:12 -0300 | 
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-09-28 21:50:46 -0300 | 
| commit | 9e452e5dd18536c3fdec61c769061047af6e32ae (patch) | |
| tree | e703821a354fc382dc021f1b0ab663a93c238f74 /ldpd/interface.c | |
| parent | 2d9c2ae397eb30f8c62a6dc11ade108d7456f802 (diff) | |
ldpd: improve ordering of interfaces on user output
Before:
debian# show mpls ldp interface
AF   Interface   State  Uptime   Hello Timers  ac
ipv4 rt0-eth0    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth1    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth10   ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth11   ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth2    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth3    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth4    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth5    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth6    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth7    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth8    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth9    ACTIVE 00:00:05 5/15           1
After:
debian# show mpls ldp interface
AF   Interface   State  Uptime   Hello Timers  ac
ipv4 rt0-eth0    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth1    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth2    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth3    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth4    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth5    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth6    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth7    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth8    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth9    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth10   ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth11   ACTIVE 00:00:14 5/15           1
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/interface.c')
| -rw-r--r-- | ldpd/interface.c | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/ldpd/interface.c b/ldpd/interface.c index ac48520f7b..a18019c0c1 100644 --- a/ldpd/interface.c +++ b/ldpd/interface.c @@ -45,7 +45,7 @@ RB_GENERATE(iface_head, iface, entry, iface_compare)  static __inline int  iface_compare(const struct iface *a, const struct iface *b)  { -	return (strcmp(a->name, b->name)); +	return (if_cmp_name_func((char *)a->name, (char *)b->name));  }  struct iface *  | 
