diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
commit | 24436414aab60dc84348ec54f23b324b4ae862a3 (patch) | |
tree | ee35283622a78eeac5656cb5661954771faf6520 /sys/net/if_sl.c | |
parent | d1265a1a72755bd0209950654a6df47287781241 (diff) |
allow bpf(4) to ignore packets based on their direction (inbound or
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r-- | sys/net/if_sl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 7e4e02e6221..d8ca585064a 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sl.c,v 1.31 2006/03/11 22:44:47 brad Exp $ */ +/* $OpenBSD: if_sl.c,v 1.32 2006/03/25 22:41:47 djm Exp $ */ /* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */ /* @@ -580,7 +580,8 @@ slstart(tp) */ bpfbuf[SLX_DIR] = SLIPDIR_OUT; bcopy(mtod(m, caddr_t), &bpfbuf[SLX_CHDR], CHDR_LEN); - bpf_tap(sc->sc_bpf, bpfbuf, len + SLIP_HDRLEN); + bpf_tap(sc->sc_bpf, bpfbuf, len + SLIP_HDRLEN, + BPF_DIRECTION_OUT); } #endif getmicrotime(&sc->sc_lastpacket); @@ -866,7 +867,7 @@ slinput(c, tp) memcpy(&hp[SLX_CHDR], chdr, CHDR_LEN); s = splnet(); - bpf_mtap(sc->sc_bpf, m); + bpf_mtap(sc->sc_bpf, m, BPF_DIRECTION_IN); splx(s); m_adj(m, SLIP_HDRLEN); |