summaryrefslogtreecommitdiff
path: root/sys/src/9/ip/devip.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-07-09 01:32:21 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2018-07-09 01:32:21 +0200
commit9898aafa0c1212b6c4aee99cb6b9f8280e88e5af (patch)
treedf22f68ffa87c6e98b71f1b990f505d5a5a9b2bb /sys/src/9/ip/devip.c
parent8fd222c1575da1fdebc6906799476c953c8f6cf5 (diff)
devip: don't pad the tag for routing commands (fixes removing routes with < 4 character tags)
Diffstat (limited to 'sys/src/9/ip/devip.c')
-rw-r--r--sys/src/9/ip/devip.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/src/9/ip/devip.c b/sys/src/9/ip/devip.c
index 447c1ce68..a00d4ed84 100644
--- a/sys/src/9/ip/devip.c
+++ b/sys/src/9/ip/devip.c
@@ -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;
}