mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
Allow pacf openflow plugin to speficy a priority offset.
This commit is contained in:
parent
208d150a0e
commit
8c292ddd49
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ export {
|
||||||
forward: bool &default=T;
|
forward: bool &default=T;
|
||||||
idle_timeout: count &default=60;
|
idle_timeout: count &default=60;
|
||||||
table_id: count &optional;
|
table_id: count &optional;
|
||||||
|
priority_offset: int &default=+0; ##< add this to all rule priorities. Can be useful if you want the openflow priorities be offset from the pacf priorities without having to write a filter function.
|
||||||
|
|
||||||
check_pred: function(p: PluginState, r: Rule): bool &optional &weaken;
|
check_pred: function(p: PluginState, r: Rule): bool &optional &weaken;
|
||||||
match_pred: function(p: PluginState, e: Entity, m: vector of OpenFlow::ofp_match): vector of OpenFlow::ofp_match &optional &weaken;
|
match_pred: function(p: PluginState, e: Entity, m: vector of OpenFlow::ofp_match): vector of OpenFlow::ofp_match &optional &weaken;
|
||||||
|
@ -179,7 +180,7 @@ function openflow_rule_to_flow_mod(p: PluginState, r: Rule) : OpenFlow::ofp_flow
|
||||||
$cookie=r$id,
|
$cookie=r$id,
|
||||||
$command=OpenFlow::OFPFC_ADD,
|
$command=OpenFlow::OFPFC_ADD,
|
||||||
$idle_timeout=c$idle_timeout,
|
$idle_timeout=c$idle_timeout,
|
||||||
$priority=int_to_count(r$priority)
|
$priority=int_to_count(r$priority + c$priority_offset)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( r?$expire )
|
if ( r?$expire )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue