Module Name: src
Committed By: christos
Date: Mon Oct 16 11:18:43 UTC 2017
Modified Files:
src/usr.sbin/npf/npfd: npfd.c
Log Message:
Treat EOF as a condition to re-open the pcap socket. Since we've been woken
up by poll(2), there must be data to read. If there is not, our socket might
not be ok anymore.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/npf/npfd/npfd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/npf/npfd/npfd.c
diff -u src/usr.sbin/npf/npfd/npfd.c:1.8 src/usr.sbin/npf/npfd/npfd.c:1.9
--- src/usr.sbin/npf/npfd/npfd.c:1.8 Sun Oct 15 11:26:10 2017
+++ src/usr.sbin/npf/npfd/npfd.c Mon Oct 16 07:18:43 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: npfd.c,v 1.8 2017/10/15 15:26:10 christos Exp $ */
+/* $NetBSD: npfd.c,v 1.9 2017/10/16 11:18:43 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: npfd.c,v 1.8 2017/10/15 15:26:10 christos Exp $");
+__RCSID("$NetBSD: npfd.c,v 1.9 2017/10/16 11:18:43 christos Exp $");
#include <stdio.h>
#include <string.h>
@@ -110,7 +110,7 @@ npfd_event_loop(npfd_log_t *log, int del
npfd_log_flush(log);
count = 0;
}
- if (npfd_log(log) < 0)
+ if (npfd_log(log) <= 0)
npfd_log_pcap_reopen(log);
}