diff --git a/ovs/openflow.go b/ovs/openflow.go index 17458e4..9300571 100644 --- a/ovs/openflow.go +++ b/ovs/openflow.go @@ -431,6 +431,13 @@ func parseEach(in []byte, prefix []byte, fn func(b []byte) error) error { // Scan every two lines to retrieve information needed to unmarshal // a single PortStats struct. for scanner.Scan() { + + // After 630 ports the DumpPortsPrefix is shown again. + // Detect here to discover if we need to continue the loop. + if bytes.HasPrefix(scanner.Bytes(), prefix) { + continue + } + b := make([]byte, len(scanner.Bytes())) copy(b, scanner.Bytes())