devip: don't pad the tag for routing commands (fixes removing routes with < 4 character tags)

This commit is contained in:
cinap_lenrek 2018-07-09 01:32:21 +02:00
parent 8fd222c157
commit 9898aafa0c

View file

@ -260,15 +260,10 @@ IPaux*
newipaux(char *owner, char *tag)
{
IPaux *a;
int n;
a = smalloc(sizeof(*a));
kstrdup(&a->owner, owner);
memset(a->tag, ' ', sizeof(a->tag));
n = strlen(tag);
if(n > sizeof(a->tag))
n = sizeof(a->tag);
memmove(a->tag, tag, n);
strncpy(a->tag, tag, sizeof(a->tag));
return a;
}