[PATCH v2 06/12] packet: Don't hard code maximum packet size to UINT16_MAX