diff options
author | 2021-01-19 10:28:07 +0000 | |
---|---|---|
committer | 2021-01-19 10:28:07 +0000 | |
commit | d200470ea2a6bac18c33bf36868c6e8d8c102b87 (patch) | |
tree | 8f238ceca018041d7ceed8eb2b5c125c922c4761 | |
parent | Make the struct imsgev structs static and with that ripd -fno-common clean. (diff) | |
download | wireguard-openbsd-d200470ea2a6bac18c33bf36868c6e8d8c102b87.tar.xz wireguard-openbsd-d200470ea2a6bac18c33bf36868c6e8d8c102b87.zip |
Do not use IBUF_READ_SIZE for the packet read buffer size. Instead
define READ_BUF_SIZE like the other daemons.
-rw-r--r-- | usr.sbin/ripd/packet.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripd/ripd.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ripd/packet.c b/usr.sbin/ripd/packet.c index cc10965b1f5..87afdf871d1 100644 --- a/usr.sbin/ripd/packet.c +++ b/usr.sbin/ripd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.14 2021/01/19 10:02:22 claudio Exp $ */ +/* $OpenBSD: packet.c,v 1.15 2021/01/19 10:28:07 claudio Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -78,7 +78,7 @@ send_packet(struct iface *iface, void *pkt, size_t len, struct sockaddr_in *dst) void recv_packet(int fd, short event, void *bula) { - static char pkt_ptr[IBUF_READ_SIZE]; + static char pkt_ptr[READ_BUF_SIZE]; union { struct cmsghdr hdr; char buf[CMSG_SPACE(sizeof(struct sockaddr_dl))]; diff --git a/usr.sbin/ripd/ripd.h b/usr.sbin/ripd/ripd.h index 2ff9c73d102..93b6bb32030 100644 --- a/usr.sbin/ripd/ripd.h +++ b/usr.sbin/ripd/ripd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ripd.h,v 1.27 2021/01/19 10:18:56 claudio Exp $ */ +/* $OpenBSD: ripd.h,v 1.28 2021/01/19 10:28:07 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -43,6 +43,8 @@ #define NBR_TIMEOUT 180 +#define READ_BUF_SIZE 65535 +#define RT_BUF_SIZE 16384 #define RT_BUF_SIZE 16384 #define MAX_RTSOCK_BUF (2 * 1024 * 1024) |