The following patch replaces the hard-coded message size of 2048 bytes in ifstated.c:rt_msg_handler() with RTM_MAXSIZE (which is currently defined as 2048 bytes) that, I believe, was the intent of the author.

Index: ifstated.c
===================================================================
RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v
retrieving revision 1.64
diff -u -p -r1.64 ifstated.c
--- ifstated.c  28 Jun 2019 13:32:47 -0000      1.64
+++ ifstated.c  14 Jul 2019 14:22:32 -0000
@@ -236,7 +236,7 @@ load_config(void)
 void
 rt_msg_handler(int fd, short event, void *arg)
 {
-       char msg[2048];
+       char msg[RTM_MAXSIZE];
        struct rt_msghdr *rtm = (struct rt_msghdr *)&msg;
        struct if_msghdr ifm;
        struct if_announcemsghdr ifan;

Reply via email to