summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4f7a4bd)
There's no guarantee that there's a timestamp in an skb, so
nflog_get_timestamp can fail.
LEPRINTF("%s ", chain_name);
struct timeval ts;
LEPRINTF("%s ", chain_name);
struct timeval ts;
- nflog_get_timestamp(ldata, &ts);
-
- LEPRINTTIME(ts.tv_sec);
+ if (nflog_get_timestamp(ldata, &ts) == 0) {
+ LEPRINTTIME(ts.tv_sec);
+ } else {
+ LEPRINTTIME(time(NULL));
+ }
if (prefix != NULL) {
LEPRINTF("%s", prefix);
if (prefix != NULL) {
LEPRINTF("%s", prefix);