devip: don't pad the tag for routing commands (fixes removing routes with < 4 character tags)
This commit is contained in:
parent
8fd222c157
commit
9898aafa0c
1 changed files with 1 additions and 6 deletions
|
@ -260,15 +260,10 @@ IPaux*
|
||||||
newipaux(char *owner, char *tag)
|
newipaux(char *owner, char *tag)
|
||||||
{
|
{
|
||||||
IPaux *a;
|
IPaux *a;
|
||||||
int n;
|
|
||||||
|
|
||||||
a = smalloc(sizeof(*a));
|
a = smalloc(sizeof(*a));
|
||||||
kstrdup(&a->owner, owner);
|
kstrdup(&a->owner, owner);
|
||||||
memset(a->tag, ' ', sizeof(a->tag));
|
strncpy(a->tag, tag, sizeof(a->tag));
|
||||||
n = strlen(tag);
|
|
||||||
if(n > sizeof(a->tag))
|
|
||||||
n = sizeof(a->tag);
|
|
||||||
memmove(a->tag, tag, n);
|
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue