Skip to content

Conversation

@copybara-service
Copy link

Fix stringification code for headerType (under pkg/tcpip/stack).

This was changed when a new headertype (virtionetheader) was added, but the _headerType_index array wasn't updated correctly.

I've fixed this by re-running stringer:

cd pkg/tcpip/stack
go run golang.org/x/tools/cmd/stringer -type headerType .

I found this when I was debugging a crash during memory-snapshot restoration. The error message says: panic: consume must not be called twice: type ernetworkHeader:

panic(fmt.Sprintf("consume must not be called twice: type %s", typ))

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12064 from abhagwat:apoorva/fix-stringification-for-headertype 88a33a9

This was changed [when a new headertype (virtionetheader) was added](c06c9de#diff-18df233b2766aad71cf642c99506a0f1b3001e1cff462e57d0deb7c4839301c8, but the `_headerType_index` array wasn't updated correctly.

I've fixed this by re-running stringer:
```
cd pkg/tcpip/stack
go run golang.org/x/tools/cmd/stringer -type headerType .
```
@copybara-service copybara-service bot added the exported Issue was exported automatically label Aug 20, 2025
…or-headertype

PiperOrigin-RevId: 797493764
@copybara-service copybara-service bot merged commit db0e3ac into master Aug 20, 2025
@copybara-service copybara-service bot deleted the test/cl797469761 branch August 20, 2025 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants