bpf: don't call bpf_detachd() in bpf_setdlt()
The bpf_attachd() will perform bpf_detachd() itself. Performing it twice will lead to doing CK_LIST_REMOVE twice. Reported & tested by: bz
This commit is contained in:
@@ -2821,7 +2821,6 @@ bpf_setdlt(struct bpf_d *d, u_int dlt)
|
||||
return (EINVAL);
|
||||
|
||||
opromisc = d->bd_promisc;
|
||||
bpf_detachd(d, false);
|
||||
bpf_attachd(d, bp);
|
||||
if (opromisc) {
|
||||
error = bp->bif_methods->bif_promisc(bp->bif_softc, true);
|
||||
|
||||
Reference in New Issue
Block a user