When parsing a netlink message, always advance to the end.

NetlinkEvent#parse relies on message-specific classes to parse
the payload of the message. If these classes do not consume the
entire message, parse does not advance to the end of the
message. This means that any code that loops over a ByteBuffer
parsing messages one at a time (e.g., NetlinkMonitor) will think
that there is still a message left to parse, and will attempt
to parse the remainder of the message as a new netlink message.
This is obviously incorrect for any buffer that contains more
than one netlink message.

Bug: 163492391
Test: existing unit tests
Change-Id: Ifdb9748068857f75ca00c58f0c40f19809aae5c9
(cherry picked from commit 0bf51a89b2fbb6cc60668a39189ef2a90bea4c5b)
Merged-In: Ifdb9748068857f75ca00c58f0c40f19809aae5c9
2 files changed
tree: 146456db009104b460fbfe4b4de268d80dd03744
  1. client-libs/
  2. common/
  3. .gitignore
  4. OWNERS
  5. PREUPLOAD.cfg
  6. TEST_MAPPING