diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-01-19 11:49:27 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-01-19 11:49:27 +0000 |
commit | a71a6cf2e79253914b73b8bdca7c94debfd1a877 (patch) | |
tree | f7513b859785fc9f785a2416c525229a8d909a51 /usr.sbin/eigrpd | |
parent | 9b8ca9c9263a1b4ec9973cd82da03522c09ab892 (diff) |
Like dvrmpd there is no need for a static pkt buffer. Adjust code accordingly.
Diffstat (limited to 'usr.sbin/eigrpd')
-rw-r--r-- | usr.sbin/eigrpd/packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/eigrpd/packet.c b/usr.sbin/eigrpd/packet.c index 193e4aa6685..1b2a15d1330 100644 --- a/usr.sbin/eigrpd/packet.c +++ b/usr.sbin/eigrpd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.19 2021/01/19 10:31:12 claudio Exp $ */ +/* $OpenBSD: packet.c,v 1.20 2021/01/19 11:49:26 claudio Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -467,7 +467,6 @@ error: void recv_packet(int fd, short event, void *bula) { - static char pkt_ptr[READ_BUF_SIZE]; union { struct cmsghdr hdr; char buf[CMSG_SPACE(CMSG_MAXLEN)]; @@ -476,6 +475,7 @@ recv_packet(int fd, short event, void *bula) struct sockaddr_storage from; struct iovec iov; struct ip ip_hdr; + char pkt[READ_BUF_SIZE]; char *buf; struct cmsghdr *cmsg; ssize_t r; @@ -491,7 +491,7 @@ recv_packet(int fd, short event, void *bula) /* setup buffer */ memset(&msg, 0, sizeof(msg)); - iov.iov_base = buf = pkt_ptr; + iov.iov_base = buf = pkt; iov.iov_len = READ_BUF_SIZE; msg.msg_name = &from; msg.msg_namelen = sizeof(from); |