Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2018 00:20:42 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Reshad Patuck <reshadpatuck1@gmail.com>, freebsd-net@freebsd.org
Subject:   Re: [netgraph] ng_bpf filter large list of IP addresses
Message-ID:  <5AC114EA.2060809@grosbein.net>
In-Reply-To: <984CD50A-A1B9-4185-8AFA-E910CB1A7DA3@gmail.com>
References:  <D4E00F05-F64D-4446-A572-E1A0E06B2C47@gmail.com> <5ABF973D.5070009@grosbein.net> <36DD471B-D88D-4074-A4D3-A480F5EC2392@gmail.com> <5AC0DFA5.3000509@grosbein.net> <984CD50A-A1B9-4185-8AFA-E910CB1A7DA3@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
01.04.2018 23:19, Reshad Patuck wrote:

> Yes I do remove the \" and replace it with just " in the file I use with the `ngctl -f` command.
> ​
> Here is the link to the file and everything that I am using to setup the BPF program.
> ​
> https://paste.ee/p/BHOoG
> ​
> It contains the following:
> - ngtl-command -> the ngctl command which runs correctly from a command line
> - ngctl-config -> the ngctl config file with the same filter
> - bpf.c -> a c file that takes netgraph node details a pcap-filter and converts it to a ngctl command
> - ngctl -> debug 5 in a ngctl shell for running the config file

Note that https://paste.ee/p/BHOoG#s=0&l=31 has garbage at the end of 31'st line.

I've just looked at ngctl's code and see I was wrong, it has some limitations:
total line length must be less than LINE_MAX (2048) and number of whitespace-separated
arguments in this line must be no more than 512.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5AC114EA.2060809>