-/* $OpenBSD: packet.c,v 1.13 2016/12/23 14:53:16 jca Exp $ */
+/* $OpenBSD: packet.c,v 1.14 2021/01/19 10:02:22 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
void
recv_packet(int fd, short event, void *bula)
{
+ static char pkt_ptr[IBUF_READ_SIZE];
union {
struct cmsghdr hdr;
char buf[CMSG_SPACE(sizeof(struct sockaddr_dl))];
-/* $OpenBSD: ripe.c,v 1.26 2021/01/19 10:00:36 claudio Exp $ */
+/* $OpenBSD: ripe.c,v 1.27 2021/01/19 10:02:22 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
/* listen on ripd control socket */
control_listen();
- if ((pkt_ptr = calloc(1, IBUF_READ_SIZE)) == NULL)
- fatal("ripe");
-
/* start interfaces */
LIST_FOREACH(iface, &xconf->iface_list, entry) {
if_init(xconf, iface);
free(iev_rde);
free(iev_main);
free(oeconf);
- free(pkt_ptr);
log_info("rip engine exiting");
_exit(0);
-/* $OpenBSD: ripe.h,v 1.13 2021/01/19 10:00:36 claudio Exp $ */
+/* $OpenBSD: ripe.h,v 1.14 2021/01/19 10:02:22 claudio Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
#include <netinet/in.h>
#include <netinet/ip.h>
-u_int8_t *pkt_ptr;
-
/* neighbor events */
enum nbr_event {
NBR_EVT_RESPONSE_RCVD,