|
|
@ -248,7 +248,7 @@ func (r *Rule) parse(s string) bool {
|
|
|
|
r.saddr = nil
|
|
|
|
r.saddr = nil
|
|
|
|
parts := strings.Split(s, "|")
|
|
|
|
parts := strings.Split(s, "|")
|
|
|
|
if len(parts) < 4 || len(parts) > 6 {
|
|
|
|
if len(parts) < 4 || len(parts) > 6 {
|
|
|
|
log.Notice("invalid number ", len(parts), " of rule parts in line ", s)
|
|
|
|
log.Notice("Error: invalid number ", len(parts), " of rule parts in line ", s)
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if parts[2] == "SYSTEM" {
|
|
|
|
if parts[2] == "SYSTEM" {
|
|
|
@ -276,7 +276,7 @@ func (r *Rule) parse(s string) bool {
|
|
|
|
r.saddr = net.ParseIP(parts[5])
|
|
|
|
r.saddr = net.ParseIP(parts[5])
|
|
|
|
|
|
|
|
|
|
|
|
if r.saddr == nil {
|
|
|
|
if r.saddr == nil {
|
|
|
|
log.Notice("invalid source IP ", parts[5], " in line ", s)
|
|
|
|
log.Notice("Error: invalid source IP ", parts[5], " in line ", s)
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|