From: claudio Date: Mon, 3 Jul 2023 10:34:08 +0000 (+0000) Subject: Use ibuf_data() and ibuf_size() instead of accessing struct ibuf. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aa2e6c71fe6f6c5734d6b3f8ceebbf6c931b216a;p=openbsd Use ibuf_data() and ibuf_size() instead of accessing struct ibuf. OK tb@ --- diff --git a/usr.sbin/ripd/message.c b/usr.sbin/ripd/message.c index 5f46ddba38f..423ef0ff460 100644 --- a/usr.sbin/ripd/message.c +++ b/usr.sbin/ripd/message.c @@ -1,4 +1,4 @@ -/* $OpenBSD: message.c,v 1.16 2023/03/08 04:43:14 guenther Exp $ */ +/* $OpenBSD: message.c,v 1.17 2023/07/03 10:34:08 claudio Exp $ */ /* * Copyright (c) 2006 Michele Marchetto @@ -134,7 +134,7 @@ send_triggered_update(struct iface *iface, struct rip_route *rr) ibuf_add(buf, &nexthop, sizeof(nexthop)); ibuf_add(buf, &metric, sizeof(metric)); - send_packet(iface, buf->buf, buf->wpos, &dst); + send_packet(iface, ibuf_data(buf), ibuf_size(buf), &dst); ibuf_free(buf); return (0); @@ -210,7 +210,7 @@ send_request(struct packet_head *r_list, struct iface *i, struct nbr *nbr) delete_entry(entry->rr); free(entry); } - send_packet(iface, buf->buf, buf->wpos, &dst); + send_packet(iface, ibuf_data(buf), ibuf_size(buf), &dst); ibuf_free(buf); } @@ -305,7 +305,7 @@ free: if (iface->auth_type == AUTH_CRYPT) auth_add_trailer(buf, iface); - send_packet(iface, buf->buf, buf->wpos, &dst); + send_packet(iface, ibuf_data(buf), ibuf_size(buf), &dst); ibuf_free(buf); }