From 7551d11f806b438be2275534b742b03f59091085 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 3 Jul 2023 10:34:31 +0000 Subject: [PATCH] Use ibuf_data() and ibuf_size() instead of accessing struct ibuf. OK tb@ --- usr.sbin/eigrpd/packet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/eigrpd/packet.c b/usr.sbin/eigrpd/packet.c index 848b8cf7618..c68ad8fe2fd 100644 --- a/usr.sbin/eigrpd/packet.c +++ b/usr.sbin/eigrpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.21 2023/06/26 14:07:19 claudio Exp $ */ +/* $OpenBSD: packet.c,v 1.22 2023/07/03 10:34:31 claudio Exp $ */ /* * Copyright (c) 2015 Renato Westphal @@ -97,7 +97,7 @@ send_packet_v4(struct iface *iface, struct nbr *nbr, struct ibuf *buf) memset(&msg, 0, sizeof(msg)); iov[0].iov_base = &ip_hdr; iov[0].iov_len = sizeof(ip_hdr); - iov[1].iov_base = buf->buf; + iov[1].iov_base = ibuf_data(buf); iov[1].iov_len = ibuf_size(buf); msg.msg_name = &dst; msg.msg_namelen = sizeof(dst); @@ -144,7 +144,7 @@ send_packet_v6(struct iface *iface, struct nbr *nbr, struct ibuf *buf) return (-1); } - if (sendto(global.eigrp_socket_v6, buf->buf, buf->wpos, 0, + if (sendto(global.eigrp_socket_v6, ibuf_data(buf), ibuf_size(buf), 0, (struct sockaddr *)&sa6, sizeof(sa6)) == -1) { log_warn("%s: error sending packet on interface %s", __func__, iface->name); -- 2.20.1