-/* $OpenBSD: rde.c,v 1.605 2023/04/20 15:44:45 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.606 2023/06/12 12:48:07 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
struct rib_entry *re;
struct prefix *xp;
struct rde_peer *peer;
- void *bp;
time_t staletime;
size_t aslen;
uint8_t l;
if ((a = asp->others[l]) == NULL)
break;
if ((wbuf = imsg_create(ibuf_se_ctl,
- IMSG_CTL_SHOW_RIB_ATTR, 0, pid,
- attr_optlen(a))) == NULL)
+ IMSG_CTL_SHOW_RIB_ATTR, 0, pid, 0)) == NULL)
return;
- if ((bp = ibuf_reserve(wbuf, attr_optlen(a))) == NULL) {
- ibuf_free(wbuf);
- return;
- }
- if (attr_write(bp, attr_optlen(a), a->flags,
- a->type, a->data, a->len) == -1) {
+ if (attr_writebuf(wbuf, a->flags, a->type, a->data,
+ a->len) == -1) {
ibuf_free(wbuf);
return;
}
-/* $OpenBSD: rde.h,v 1.293 2023/04/19 13:23:33 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.294 2023/06/12 12:48:07 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
int attr_compare(struct rde_aspath *, struct rde_aspath *);
void attr_freeall(struct rde_aspath *);
void attr_free(struct rde_aspath *, struct attr *);
-#define attr_optlen(x) \
- ((x)->len > 255 ? (x)->len + 4 : (x)->len + 3)
struct aspath *aspath_get(void *, uint16_t);
struct aspath *aspath_copy(struct aspath *);