-/* $OpenBSD: rde_attr.c,v 1.127 2022/07/28 13:11:51 deraadt Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.128 2022/08/29 18:04:51 claudio Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
;
attrtable.hashtbl = calloc(hs, sizeof(struct attr_list));
if (attrtable.hashtbl == NULL)
- fatal("attr_init");
+ fatal("%s", __func__);
for (i = 0; i < hs; i++)
LIST_INIT(&attrtable.hashtbl[i]);
asp->others_len++;
if ((p = reallocarray(asp->others,
asp->others_len, sizeof(struct attr *))) == NULL)
- fatal("attr_optadd");
+ fatal("%s", __func__);
asp->others = p;
/* l stores the size of others before resize */
}
if ((t->others = calloc(s->others_len, sizeof(struct attr *))) == 0)
- fatal("attr_copy");
+ fatal("%s", __func__);
for (l = 0; l < t->others_len; l++) {
if (s->others[l] == NULL)
a = calloc(1, sizeof(struct attr));
if (a == NULL)
- fatal("attr_optadd");
+ fatal("%s", __func__);
rdemem.attr_cnt++;
flags &= ~ATTR_DEFMASK; /* normalize mask */
a->len = len;
if (len != 0) {
if ((a->data = malloc(len)) == NULL)
- fatal("attr_optadd");
+ fatal("%s", __func__);
rdemem.attr_dcnt++;
rdemem.attr_data += len;
}
if ((ndata = malloc(nlen)) == NULL)
- fatal("aspath_deflate");
+ fatal("%s", __func__);
/* then copy the aspath */
seg = data;
nlen = attr->len + difflen;
if ((np = malloc(nlen)) == NULL)
- fatal("aspath_merge");
+ fatal("%s", __func__);
/* copy head from old aspath */
aspath_countcopy(a->aspath, diff, np, difflen, hroom);
/* no change needed but return a copy */
p = malloc(asp->len);
if (p == NULL)
- fatal("aspath_prepend");
+ fatal("%s", __func__);
memcpy(p, asp->data, asp->len);
*len = asp->len;
return (p);
p = malloc(l);
if (p == NULL)
- fatal("aspath_prepend");
+ fatal("%s", __func__);
/* first prepends */
as = htonl(as);
p = malloc(asp->len);
if (p == NULL)
- fatal("aspath_override");
+ fatal("%s", __func__);
seg = asp->data;
nseg = p;