Fix "show hardware" CLI display for bonded interface may corrupt heap

Change-Id: Ie379844047b6402884653d3fd682010a1d09d14a
Signed-off-by: John Lo <loj@cisco.com>
This commit is contained in:
John Lo
2016-07-18 12:20:09 -04:00
committed by Chris Luke
parent bb43338025
commit 2221cd8dd1

View File

@ -87,7 +87,7 @@ u8 * format_vnet_hw_interface (u8 * s, va_list * args)
{ {
int hw_idx; int hw_idx;
s = format (s, "Slave-Idx:"); s = format (s, "Slave-Idx:");
clib_bitmap_foreach (hw_idx, hi->bond_info, format(s, " %d", hw_idx)); clib_bitmap_foreach (hw_idx, hi->bond_info, s = format(s, " %d", hw_idx));
} }
else if (dev_class->format_device_name) else if (dev_class->format_device_name)
s = format (s, "%U", dev_class->format_device_name, hi->dev_instance); s = format (s, "%U", dev_class->format_device_name, hi->dev_instance);