]> git.proxmox.com Git - pve-firewall.git/commitdiff
log and ignore ENOBUFS in nfct_catch
authorDavid Limbeck <d.limbeck@proxmox.com>
Wed, 9 Jan 2019 14:32:10 +0000 (15:32 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 9 Jan 2019 15:27:20 +0000 (16:27 +0100)
nfct_catch sets ENOBUFS if not enough buffer space is available. log
and continue operation instead of stopping. in addition log possible
other errors set by nfct_catch

Signed-off-by: David Limbeck <d.limbeck@proxmox.com>
src/pvefw-logger.c

index 9c6fe4ac7359a22d13536dac90f79e11c934f0f8..f77f56f7f71be1e9eafa5f997639e3770e6e82aa 100644 (file)
@@ -954,8 +954,12 @@ nfct_read_cb(GIOChannel *source,
 {
     int res;
     if ((res = nfct_catch(nfcth)) < 0) {
-        log_status_message(3, "error catching nfct");
-        return FALSE;
+        if (errno == ENOBUFS) {
+            log_status_message(3, "nfct_catch returned ENOBUFS: conntrack information may be incomplete");
+        } else {
+            log_status_message(3, "error catching nfct: %s", strerror(errno));
+            return FALSE;
+        }
     }
     return TRUE;
 }