[dsc] Allow multiple bpf_program and append content

Jerry Lundström jerry at dns-oarc.net
Tue Jan 17 07:06:32 UTC 2017


Hi Anand,

On 01/16/17 17:48, Anand Buddhdev wrote:
> If an operator wishes, they may indent the additional lines. The extra
> spaces make no difference to the bpf compiler. But I don't like the
> syntax of repeating the option name on every following line. I already
> have to do this for "local_address" and I don't like it. I would have
> preferred "local_address" to take a list of some kind, terminated by a
> semi-colon.

Did you see that local_address can take netmasks now so you can specify
networks?

local_address 192.168.0.0 16;
local_address 10.0.0.0 255.0.0.0;

> In practice, most folk will have simple bpf expressions that fit on a
> single line. In our config at the RIPE NCC, we have some longer bpf
> expressions, but our dsc config files are generated by templates, and
> not meant for human consumption. The longer lines are therefore irrelevant.

See #114, your not alone with large filters :)

> I'm not a fan of introducing extra syntax parsing rules to please
> humans. It adds code complexity and bugs for no gain.

That is a false assumption, the changes I suggested makes the least
amount of code change, complexity and would only affect bpf_program.

The changes you've suggested would affect all options and at a very
large increase in code and config complexity which can lead to more bugs.

Cheers,
Jerry


More information about the dsc mailing list