Re: Modifying ebtables to read the commands from a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 2010-03-28 12:07, Peter Gordon wrote:

>I need to add a number of rules to the ebtables and I cannot afford the
>fork overhead for each line.

The larger part of the overhead is due to the tables recomputed (dumped, 
rule added, restored) every time you call it. That's why one should use 
xx-restore.

>So what I want to do is to read each line
>from a file and have the program iterate over the file. 
>
>ebtables-save and ebtables-restore is not good enough for my
>application, because I can't add rules incrementally.

Dump the rules with ebtables-save to a buffer, add your rules,
and use -restore. That's sort of incrementally, and the fastest
way to put a ruleset in atomic fashion into place.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux