updates on rdns resolve messages
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
8512402488
commit
ef228e3750
@ -95,13 +95,8 @@ func ScanIP(cfg *config.Config) (err error) {
|
||||
if cfg.Db.Where("rdns IS NULL").Asc("ip").Find(&orphans); len(orphans) > 0 {
|
||||
for _, i := range orphans {
|
||||
reverse, _ := i.UpdateRDNS()
|
||||
if reverse == "" {
|
||||
log.Printf("Set \"none\" rdns to IP %s\n", i.IP)
|
||||
i.Rdns.String = "none"
|
||||
} else {
|
||||
log.Printf("%s %s\n", i.IP, reverse)
|
||||
i.Rdns.String = reverse
|
||||
}
|
||||
log.Printf("%s -> \"%s\"\n", i.IP, reverse)
|
||||
i.Rdns.String = reverse
|
||||
i.Rdns.Valid = true
|
||||
_, err = cfg.Db.ID(i.ID).Cols("rdns").Update(&i)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user