diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-03-28 15:17:35 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-03-28 15:17:35 +0000 |
commit | ad2f46ed1ac24e725ba03ce610ec60330714ae90 (patch) | |
tree | ecbabd66ead888c01324f9ab73e34c291690a851 /usr.sbin/bgpd/rde_update.c | |
parent | 40633d42df78562c9239464c9b4dd8569c2ac280 (diff) |
Instead of exracting the prefix into a bgpd_addr and passing that to
prefix_write() rename prefix_write() to pt_write() and pass a pt_entry to
the function. Removes an extra conversion step.
OK tb@
Diffstat (limited to 'usr.sbin/bgpd/rde_update.c')
-rw-r--r-- | usr.sbin/bgpd/rde_update.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c index dba64a1b374..dc4bf1e9673 100644 --- a/usr.sbin/bgpd/rde_update.c +++ b/usr.sbin/bgpd/rde_update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_update.c,v 1.159 2023/03/13 16:52:42 claudio Exp $ */ +/* $OpenBSD: rde_update.c,v 1.160 2023/03/28 15:17:34 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -836,7 +836,6 @@ up_dump_prefix(u_char *buf, int len, struct prefix_tree *prefix_head, struct rde_peer *peer, int withdraw) { struct prefix *p, *np; - struct bgpd_addr addr; uint32_t pathid; int r, wpos = 0, done = 0; @@ -848,9 +847,8 @@ up_dump_prefix(u_char *buf, int len, struct prefix_tree *prefix_head, memcpy(buf + wpos, &pathid, sizeof(pathid)); wpos += sizeof(pathid); } - pt_getaddr(p->pt, &addr); - if ((r = prefix_write(buf + wpos, len - wpos, - &addr, p->pt->prefixlen, withdraw)) == -1) { + if ((r = pt_write(buf + wpos, len - wpos, p->pt, + withdraw)) == -1) { if (peer_has_add_path(peer, p->pt->aid, CAPA_AP_SEND)) wpos -= sizeof(pathid); break; |