My Darwin BSD has devices bpf0,1 and then only bpf10 available in this range.
With other processes taking up some sockets I'm running into an unable to open BPF device at times.
I do however have room to go up to 256 BPF devices available. So this PR is a suggestion to take it up from 0 to 255 to find the first available device.
➜ /dev ls | grep bpf | wc -l
256
Alternatively a file listing could be done in the directory prior to setting the for loop limit.
My Darwin BSD has devices bpf0,1 and then only bpf10 available in this range. With other processes taking up some sockets I'm running into an
unable to open BPF device
at times.I do however have room to go up to 256 BPF devices available. So this PR is a suggestion to take it up from 0 to 255 to find the first available device.
Alternatively a file listing could be done in the directory prior to setting the for loop limit.
Thank you for considering