Subject: bpf: change of DLT affects promiscuous mode
To: None <>
From: David Young <>
List: tech-net
Date: 09/06/2002 01:24:32
In bpf, with a change of DLT through BIOCSDLT, promiscuous mode is turned
off by bpf_detachd and never turned back on again. In the interests of
"least astonishment," In bpf_setdlt, I suggest bpf save the promiscuous
mode state before calling bpf_detachd, and restore it after calling
reset_d. I.e.,

        s = splnet();
        opromisc = d->bd_promisc;
        bpf_attachd(d, bp);
        if (opromisc) {
                int error;

                error = ifpromisc(bp->bif_ifp, 1);
                if (error && error != EINVAL)
                        panic("bpf: ifpromisc failed");


David Young             OJC Technologies      Engineering from the Right Brain
                        Urbana, IL * (217) 278-3933