mirror of
https://github.com/cirruslabs/tart.git
synced 2026-10-07 14:41:15 +02:00
Handle incomplete MAC address (#15)
This commit is contained in:
@@ -81,6 +81,9 @@ struct ARPCache {
|
||||
}
|
||||
|
||||
let rawMAC = try match.getCaptureGroup(name: "mac", for: line)
|
||||
if rawMAC == "(incomplete)" {
|
||||
continue
|
||||
}
|
||||
guard let mac = MACAddress(fromString: rawMAC) else {
|
||||
throw ARPCommandYieldedInvalidOutputError(explanation: "failed to parse MAC address \(rawMAC)")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user