Skip to content

Commit

Permalink
fix #873 without breaking backward (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
buixor committed Nov 15, 2021
1 parent 37c2a10 commit 3c76849
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/leakybucket/overflows.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ func SourceFromEvent(evt types.Event, leaky *Leaky) (map[string]models.Source, e
src.Scope = &leaky.scopeType.Scope
if v, ok := evt.Enriched["ASNumber"]; ok {
src.AsNumber = v
} else if v, ok := evt.Enriched["ASNNumber"]; ok {
src.AsNumber = v
}
if v, ok := evt.Enriched["IsoCode"]; ok {
src.Cn = v
Expand Down
1 change: 1 addition & 0 deletions pkg/parser/enrich_geoip.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func GeoIpASN(field string, p *types.Event, ctx interface{}) (map[string]string,
return nil, nil
}
ret["ASNNumber"] = fmt.Sprintf("%d", record.AutonomousSystemNumber)
ret["ASNumber"] = fmt.Sprintf("%d", record.AutonomousSystemNumber)
ret["ASNOrg"] = record.AutonomousSystemOrganization

log.Tracef("geoip ASN %s -> %s, %s", field, ret["ASNNumber"], ret["ASNOrg"])
Expand Down

0 comments on commit 3c76849

Please sign in to comment.