Similar to the other daemons use ibuf_data() and ibuf_size() instead of
direct access.

-- 
:wq Claudio

Index: message.c
===================================================================
RCS file: /cvs/src/usr.sbin/ripd/message.c,v
retrieving revision 1.16
diff -u -p -r1.16 message.c
--- message.c   8 Mar 2023 04:43:14 -0000       1.16
+++ message.c   19 Apr 2023 13:13:02 -0000
@@ -134,7 +134,7 @@ send_triggered_update(struct iface *ifac
        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,
                        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);
        }
 

Reply via email to