flowtop: Don't attempt to set sysctl values if initial read fails
commitf472d90b141d0e9f0c1033012d6d2be1338b7b1f
authorTobias Klauser <tklauser@distanz.ch>
Mon, 7 Sep 2015 15:09:45 +0000 (7 17:09 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Mon, 7 Sep 2015 15:24:36 +0000 (7 17:24 +0200)
treefb42a037b373cb22d68b2d861d672ead2218fea8
parentd5bdc3836a9b8bfc03b9c9ff86d913e0717fd300
flowtop: Don't attempt to set sysctl values if initial read fails

Bail out early if we fail to read the current sysctl variable values for
net/netfilter/nf_conntrack_acct and net/netfilter/nf_conntrack_timestamp

Otherwise we'll not be able restore the previous value on exit/panic.
Moreover, if we fail to read the sysctl file, we usually also lack the
permissions to write it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
flowtop.c