 -
 +	if (quality == BPF_TSTAMP_NORMAL) {
 +#ifdef FFCLOCK
++		if ((tstype & BPF_T_FFCLOCK) == 0) {
++			ffclock_read_counter(ffcount);
++#endif
++			binuptime(bt);
++#ifdef FFCLOCK
++		} else
++			ffclock_abstime(ffcount, bt, NULL, FFCLOCK_UTC);
++#endif
++	} else {
++#ifdef FFCLOCK
++		ffclock_last_tick(ffcount, bt, FFCLOCK_UTC);
 +		if ((tstype & BPF_T_FFCLOCK) == 0)
 +#endif
-+			binuptime(bt);
-+#ifdef FFCLOCK
-+		else {
-+			ffclock_abstime(ffcount, bt, NULL, FFCLOCK_UTC);
-+		}
-+#endif
-+	} else {
-+#ifdef FFCLOCK
-+		if ((tstype & BPF_T_FFCLOCK) == 0)
-+#endif
 +			getbinuptime(bt);
-+#ifdef FFCLOCK
-+		else
-+			ffclock_last_tick(ffcount, bt, FFCLOCK_UTC);
-+#endif
 +	}
  	return (quality);
  }

 	    (((d)->bd_direction == BPF_D_IN && (r) != (i)) ||	\
 	    ((d)->bd_direction == BPF_D_OUT && (r) == (i)))
 
@@ -1861,20 +1935,23 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, 
 void
 bpf_mtap(struct bpf_if *bp, struct mbuf *m)
 {

Allow to choose between feedback and feed-forward clock for timestamping.

---
 net/bpf.c |  144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 net/bpf.h |   18 +++++++
 2 files changed, 157 insertions(+), 5 deletions(-)

Index: sys/net/bpf.c
===================================================================
--- sys.orig/net/bpf.c	2011-06-29 16:57:27.000000000 +1000
+++ sys/net/bpf.c	2011-06-29 18:28:25.000000000 +1000
@@ -1,19 +1,25 @@
 /*-
  * Copyright (C) 1990, 1991, 1993
