From aa2e6c71fe6f6c5734d6b3f8ceebbf6c931b216a Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 3 Jul 2023 10:34:08 +0000 Subject: [PATCH] Use ibuf_data() and ibuf_size() instead of accessing struct ibuf. OK tb@ --- usr.sbin/ripd/message.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } -- 2.20.1