Interface name shortening introduces double periods ('..') as spacers,
which cause issues during JSON stats serialization as there '.'
characters are also used as separators to define nesting of the JSON
output. This commit makes sure that '..' are skipped during tokenizing.
Fixes Redmine bug #2208.
const char *dot = index(key, '.');
if (dot == NULL)
return NULL;
+ if (*(dot + 1) == '.' && *(dot + 2) != '\0')
+ dot = index(dot + 2, '.');
size_t predot_len = (dot - key) + 1;
char s[predot_len];