-/* $OpenBSD: ospfe.c,v 1.64 2021/01/19 09:42:11 claudio Exp $ */
+/* $OpenBSD: ospfe.c,v 1.65 2021/01/19 09:43:40 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
/* remove unneeded config stuff */
conf_clear_redist_list(&oeconf->redist_list);
- if ((pkt_ptr = calloc(1, READ_BUF_SIZE)) == NULL)
- fatal("ospfe");
-
/* start interfaces */
LIST_FOREACH(area, &oeconf->area_list, entry) {
ospfe_demote_area(area, 0);
free(iev_rde);
free(iev_main);
free(oeconf);
- free(pkt_ptr);
log_info("ospf engine exiting");
_exit(0);
-/* $OpenBSD: ospfe.h,v 1.24 2021/01/19 09:42:11 claudio Exp $ */
+/* $OpenBSD: ospfe.h,v 1.25 2021/01/19 09:43:40 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
int send_packet(struct iface *, struct ibuf *, struct in6_addr *);
void recv_packet(int, short, void *);
-char *pkt_ptr; /* packet buffer */
-
#endif /* _OSPFE_H_ */
-/* $OpenBSD: packet.c,v 1.18 2021/01/12 09:54:44 claudio Exp $ */
+/* $OpenBSD: packet.c,v 1.19 2021/01/19 09:43:40 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
void
recv_packet(int fd, short event, void *bula)
{
+ static char pkt_ptr[READ_BUF_SIZE];
union {
struct cmsghdr hdr;
char buf[CMSG_SPACE(sizeof(struct in6_pktinfo))];