summaryrefslogtreecommitdiffstats
path: root/sys/netatm
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-07-25 06:43:41 +0000
committerharti <harti@FreeBSD.org>2003-07-25 06:43:41 +0000
commit0ab49b29f841747dfc40bab6581e10b2229c713d (patch)
tree221d3ed3e37b96382a0bc4022dc8a7294bfefceb /sys/netatm
parent820cd379cebe8246b5360b81e1e1442f4422bca7 (diff)
downloadFreeBSD-src-0ab49b29f841747dfc40bab6581e10b2229c713d.zip
FreeBSD-src-0ab49b29f841747dfc40bab6581e10b2229c713d.tar.gz
Hand the packet to bpf not only in the LLC/SNAP case, but for all
connections. While this confuses tcpdump, it enables other applications to see and analyze non-IP traffic (signalling, for example). Pointed out by: Vincent Jardin <vjardin@wanadoo.fr>
Diffstat (limited to 'sys/netatm')
-rw-r--r--sys/netatm/atm_cm.c23
-rw-r--r--sys/netatm/atm_device.c3
2 files changed, 13 insertions, 13 deletions
diff --git a/sys/netatm/atm_cm.c b/sys/netatm/atm_cm.c
index f21db37..8332e83 100644
--- a/sys/netatm/atm_cm.c
+++ b/sys/netatm/atm_cm.c
@@ -2888,6 +2888,18 @@ atm_cm_cpcs_upper(cmd, tok, arg1, arg2)
}
/*
+ * Send the packet to the interface's bpf if this
+ * vc has one.
+ */
+ if (cvp->cvc_vcc != NULL &&
+ cvp->cvc_vcc->vc_nif != NULL) {
+ struct ifnet *ifp =
+ (struct ifnet *)cvp->cvc_vcc->vc_nif;
+
+ BPF_MTAP(ifp, m);
+ }
+
+ /*
* Locate packet's connection
*/
cop = cvp->cvc_conn;
@@ -2901,17 +2913,6 @@ atm_cm_cpcs_upper(cmd, tok, arg1, arg2)
case ATM_ENC_LLC:
/*
- * Send the packet to the interface's bpf if this
- * vc has one.
- */
- if (cvp->cvc_vcc != NULL &&
- cvp->cvc_vcc->vc_nif != NULL) {
- struct ifnet *ifp =
- (struct ifnet *)cvp->cvc_vcc->vc_nif;
-
- BPF_MTAP(ifp, m);
- }
- /*
* Find connection with matching LLC header
*/
if (KB_LEN(m) < T_ATM_LLC_MAX_LEN) {
diff --git a/sys/netatm/atm_device.c b/sys/netatm/atm_device.c
index 34c6253..4481a35 100644
--- a/sys/netatm/atm_device.c
+++ b/sys/netatm/atm_device.c
@@ -374,8 +374,7 @@ atm_dev_lower(cmd, tok, arg1, arg2)
/*
* Send the packet to the interface's bpf if this vc has one.
*/
- if (cvcp->cvc_conn->co_mpx == ATM_ENC_LLC &&
- cvcp->cvc_vcc && cvcp->cvc_vcc->vc_nif) {
+ if (cvcp->cvc_vcc != NULL && cvcp->cvc_vcc->vc_nif != NULL) {
struct ifnet *ifp =
(struct ifnet *)cvcp->cvc_vcc->vc_nif;
OpenPOWER on IntegriCloud