mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
6803808137
commit
026d2fad6f
2 changed files with 6 additions and 6 deletions
|
@ -31,7 +31,7 @@ const (
|
|||
NF_REPEAT Verdict = 4
|
||||
NF_STOP Verdict = 5
|
||||
|
||||
NF_DEFAULT_QUEUE_SIZE uint32 = 0xffff
|
||||
NF_DEFAULT_QUEUE_SIZE uint32 = 4096
|
||||
NF_DEFAULT_PACKET_SIZE uint32 = 4096
|
||||
|
||||
ipv4version = 0x40
|
||||
|
|
|
@ -45,7 +45,7 @@ func NewOperator(t Type, o Operand, data string) Operator {
|
|||
Operand: o,
|
||||
Data: data,
|
||||
}
|
||||
op.Compile()
|
||||
op.compile()
|
||||
return op
|
||||
}
|
||||
|
||||
|
@ -54,13 +54,13 @@ func (o *Operator) UnmarshalJSON(b []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// make sure it's ready to be used
|
||||
o.Compile()
|
||||
// make sure it's ready to be used after being
|
||||
// deserialized from a json rule file
|
||||
o.compile()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *Operator) Compile() {
|
||||
func (o *Operator) compile() {
|
||||
if o.Type == Simple {
|
||||
o.cb = o.simpleCmp
|
||||
} else if o.Type == Regexp {
|
||||
|
|
Loading…
Add table
Reference in a new issue