Changeset View
Changeset View
Standalone View
Standalone View
sys/net/bpf.c
Show First 20 Lines • Show All 683 Lines • ▼ Show 20 Lines | if (d->bd_writer == 0 || fcode == NULL) | ||||
return (0); | return (0); | ||||
need_upgrade = 0; | need_upgrade = 0; | ||||
/* | /* | ||||
* Check if cmd looks like snaplen setting from | * Check if cmd looks like snaplen setting from | ||||
* pcap_bpf.c:pcap_open_live(). | * pcap_bpf.c:pcap_open_live(). | ||||
* Note we're not checking .k value here: | * Note we're not checking .k value here: | ||||
* while pcap_open_live() definitely sets to to non-zero value, | * while pcap_open_live() definitely sets to non-zero value, | ||||
* we'd prefer to treat k=0 (deny ALL) case the same way: e.g. | * we'd prefer to treat k=0 (deny ALL) case the same way: e.g. | ||||
* do not consider upgrading immediately | * do not consider upgrading immediately | ||||
*/ | */ | ||||
if (cmd == BIOCSETF && flen == 1 && fcode[0].code == (BPF_RET | BPF_K)) | if (cmd == BIOCSETF && flen == 1 && fcode[0].code == (BPF_RET | BPF_K)) | ||||
is_snap = 1; | is_snap = 1; | ||||
else | else | ||||
is_snap = 0; | is_snap = 0; | ||||
▲ Show 20 Lines • Show All 2,344 Lines • Show Last 20 Lines |