From: claudio Date: Mon, 3 Jul 2023 10:34:31 +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=7551d11f806b438be2275534b742b03f59091085;p=openbsd Use ibuf_data() and ibuf_size() instead of accessing struct ibuf. OK tb@ --- 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);