The longest path is almost certainly between two of the outer vertices. It is also almost certainly necessary to cover all of the vertices in the cycle.
Thus you want to use DFS to map out the cycle in O(N). Then calculate the length of the current cycle arrangement. Add to that length the distance from the first point in the cycle to it's outer, and the last point to it's outer. And that gives you the actual path length, which you store separately from the cycle length.
Increase the index of the first point and the last point (can be done in O(1)), remove the length of the edge that now goes directed from the first to last point. Then add the outer lengths again. Repeat until you've covered all of the vertices. Since your storing and updating the path length instead of actually recalculating it each time (which would require (O(N^2)), it can be done in O(N).
This allows traversing of the cycle in O(N). However, it is not an exact algorithm. That requires checking that you shouldn't have used the first+i and/or last-j for some i,j instead. To fully check for that requires essentially O(N^2).
Although, you might be about to do it in around O(N log N) by cleverly determining where those edge cases are possible. I doubt an exact linear algorithm is possible.