// TrackWANAddress tracks the IP address assigned to the WAN port.
TrackWANAddress tracks the IP address assigned to the WAN port.
// TrackWANAddress tracks the IP address assigned to the WAN port .
func TrackWANAddress(logItem *LogItem) bool {
	if logItem.Event == "Internet connected" {
		if wanAddressInstant == nil || logItem.Instant.After(*wanAddressInstant) {
			matches := wanAddressRE.FindStringSubmatch(logItem.Detail)
			if len(matches) != 2 {
				log.Fatal("Expected 2 matches in " + logItem.Detail)
			}
			WANAddress = matches[1]
			wanAddressInstant = &logItem.Instant
		}
		return true
	}
	return false
}
func TrackWANAddress ( logItem * LogItem ) bool { if logItem . Event == " " { if wanAddressInstant == nil || logItem . Instant . After ( * wanAddressInstant ) { matches := wanAddressRE . FindStringSubmatch ( logItem . Detail ) if len ( matches ) != 2 { log . Fatal ( " " + logItem . Detail ) } WANAddress = matches [ 1 ] wanAddressInstant = & logItem . Instant } return true } return false }
TrackWANAddress tracks the IP address assigned to the WAN port.
TrackWANAddress tracks the IP address assigned to the WAN port .