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>
This commit is contained in:
Hartmut Brandt 2003-07-25 06:43:41 +00:00
parent 6c373d607e
commit 9b18b1f47d
2 changed files with 13 additions and 13 deletions

View file

@ -2887,6 +2887,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
*/
@ -2900,17 +2912,6 @@ atm_cm_cpcs_upper(cmd, tok, arg1, arg2)
break;
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
*/

View file

@ -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;