Destination table needs it's own negation flag passed to the pfr_update_stats.
authormikeb <mikeb@openbsd.org>
Wed, 8 Apr 2015 12:50:21 +0000 (12:50 +0000)
committermikeb <mikeb@openbsd.org>
Wed, 8 Apr 2015 12:50:21 +0000 (12:50 +0000)
Spotted by Alexandr Nedvedicky <alexandr ! nedvedicky at oracle ! com>,
thanks a lot!  Ok florian

sys/net/pf.c

index 8e180b0..e6a395a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pf.c,v 1.909 2015/03/18 12:23:15 dlg Exp $ */
+/*     $OpenBSD: pf.c,v 1.910 2015/04/08 12:50:21 mikeb Exp $ */
 
 /*
  * Copyright (c) 2001 Daniel Hartmeier
@@ -6277,7 +6277,7 @@ pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_state *s,
                                        pfr_update_stats(ri->r->dst.addr.p.tbl,
                                            &s->key[(s->direction == PF_IN)]->
                                                addr[(s->direction == PF_IN)],
-                                           pd, ri->r->action, ri->r->src.neg);
+                                           pd, ri->r->action, ri->r->dst.neg);
                        }
                }
                if (r->src.addr.type == PF_ADDR_TABLE)