mirror of https://github.com/cirruslabs/tart.git
Handle incomplete MAC address (#15)
This commit is contained in:
parent
49d430b3c4
commit
9f8d3017d9
|
|
@ -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)")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue