snapshot: sagernet/gvisor v0.0.0-20250811.0-sing-box-mod.1
Содержимое пина, зафиксированного в go.mod sing-box-lx, одним коммитом без истории. Полная история SagerNet/gvisor — 1.45 ГБ и клонируется в каждой CI-джобе; наша дельта — одна вставка в одну функцию, история для неё не нужна. Module path github.com/sagernet/gvisor сохранён намеренно: на него опирается replace-директива суперпроекта. Патч поверх — отдельным коммитом, чтобы дельта читалась одним git show и переносилась на новый пин копированием. SPECS/TASKS/048-GVISOR_HANDSHAKE_NIL_CRASH
This commit is contained in:
commit
2c4ae3b0a4
712 changed files with 185689 additions and 0 deletions
152
pkg/tcpip/link/tun/tun_state_autogen.go
Normal file
152
pkg/tcpip/link/tun/tun_state_autogen.go
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
// automatically generated by stateify.
|
||||
|
||||
package tun
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/sagernet/gvisor/pkg/state"
|
||||
)
|
||||
|
||||
func (d *Device) StateTypeName() string {
|
||||
return "pkg/tcpip/link/tun.Device"
|
||||
}
|
||||
|
||||
func (d *Device) StateFields() []string {
|
||||
return []string{
|
||||
"Queue",
|
||||
"endpoint",
|
||||
"notifyHandle",
|
||||
"flags",
|
||||
}
|
||||
}
|
||||
|
||||
// +checklocksignore
|
||||
func (d *Device) StateSave(stateSinkObject state.Sink) {
|
||||
d.beforeSave()
|
||||
stateSinkObject.Save(0, &d.Queue)
|
||||
stateSinkObject.Save(1, &d.endpoint)
|
||||
stateSinkObject.Save(2, &d.notifyHandle)
|
||||
stateSinkObject.Save(3, &d.flags)
|
||||
}
|
||||
|
||||
func (d *Device) afterLoad(context.Context) {}
|
||||
|
||||
// +checklocksignore
|
||||
func (d *Device) StateLoad(ctx context.Context, stateSourceObject state.Source) {
|
||||
stateSourceObject.Load(0, &d.Queue)
|
||||
stateSourceObject.Load(1, &d.endpoint)
|
||||
stateSourceObject.Load(2, &d.notifyHandle)
|
||||
stateSourceObject.Load(3, &d.flags)
|
||||
}
|
||||
|
||||
func (f *Flags) StateTypeName() string {
|
||||
return "pkg/tcpip/link/tun.Flags"
|
||||
}
|
||||
|
||||
func (f *Flags) StateFields() []string {
|
||||
return []string{
|
||||
"TUN",
|
||||
"TAP",
|
||||
"NoPacketInfo",
|
||||
"Exclusive",
|
||||
}
|
||||
}
|
||||
|
||||
func (f *Flags) beforeSave() {}
|
||||
|
||||
// +checklocksignore
|
||||
func (f *Flags) StateSave(stateSinkObject state.Sink) {
|
||||
f.beforeSave()
|
||||
stateSinkObject.Save(0, &f.TUN)
|
||||
stateSinkObject.Save(1, &f.TAP)
|
||||
stateSinkObject.Save(2, &f.NoPacketInfo)
|
||||
stateSinkObject.Save(3, &f.Exclusive)
|
||||
}
|
||||
|
||||
func (f *Flags) afterLoad(context.Context) {}
|
||||
|
||||
// +checklocksignore
|
||||
func (f *Flags) StateLoad(ctx context.Context, stateSourceObject state.Source) {
|
||||
stateSourceObject.Load(0, &f.TUN)
|
||||
stateSourceObject.Load(1, &f.TAP)
|
||||
stateSourceObject.Load(2, &f.NoPacketInfo)
|
||||
stateSourceObject.Load(3, &f.Exclusive)
|
||||
}
|
||||
|
||||
func (e *tunEndpoint) StateTypeName() string {
|
||||
return "pkg/tcpip/link/tun.tunEndpoint"
|
||||
}
|
||||
|
||||
func (e *tunEndpoint) StateFields() []string {
|
||||
return []string{
|
||||
"tunEndpointRefs",
|
||||
"Endpoint",
|
||||
"stack",
|
||||
"nicID",
|
||||
"name",
|
||||
"isTap",
|
||||
"persistent",
|
||||
"closed",
|
||||
}
|
||||
}
|
||||
|
||||
func (e *tunEndpoint) beforeSave() {}
|
||||
|
||||
// +checklocksignore
|
||||
func (e *tunEndpoint) StateSave(stateSinkObject state.Sink) {
|
||||
e.beforeSave()
|
||||
stateSinkObject.Save(0, &e.tunEndpointRefs)
|
||||
stateSinkObject.Save(1, &e.Endpoint)
|
||||
stateSinkObject.Save(2, &e.stack)
|
||||
stateSinkObject.Save(3, &e.nicID)
|
||||
stateSinkObject.Save(4, &e.name)
|
||||
stateSinkObject.Save(5, &e.isTap)
|
||||
stateSinkObject.Save(6, &e.persistent)
|
||||
stateSinkObject.Save(7, &e.closed)
|
||||
}
|
||||
|
||||
func (e *tunEndpoint) afterLoad(context.Context) {}
|
||||
|
||||
// +checklocksignore
|
||||
func (e *tunEndpoint) StateLoad(ctx context.Context, stateSourceObject state.Source) {
|
||||
stateSourceObject.Load(0, &e.tunEndpointRefs)
|
||||
stateSourceObject.Load(1, &e.Endpoint)
|
||||
stateSourceObject.Load(2, &e.stack)
|
||||
stateSourceObject.Load(3, &e.nicID)
|
||||
stateSourceObject.Load(4, &e.name)
|
||||
stateSourceObject.Load(5, &e.isTap)
|
||||
stateSourceObject.Load(6, &e.persistent)
|
||||
stateSourceObject.Load(7, &e.closed)
|
||||
}
|
||||
|
||||
func (r *tunEndpointRefs) StateTypeName() string {
|
||||
return "pkg/tcpip/link/tun.tunEndpointRefs"
|
||||
}
|
||||
|
||||
func (r *tunEndpointRefs) StateFields() []string {
|
||||
return []string{
|
||||
"refCount",
|
||||
}
|
||||
}
|
||||
|
||||
func (r *tunEndpointRefs) beforeSave() {}
|
||||
|
||||
// +checklocksignore
|
||||
func (r *tunEndpointRefs) StateSave(stateSinkObject state.Sink) {
|
||||
r.beforeSave()
|
||||
stateSinkObject.Save(0, &r.refCount)
|
||||
}
|
||||
|
||||
// +checklocksignore
|
||||
func (r *tunEndpointRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
|
||||
stateSourceObject.Load(0, &r.refCount)
|
||||
stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
|
||||
}
|
||||
|
||||
func init() {
|
||||
state.Register((*Device)(nil))
|
||||
state.Register((*Flags)(nil))
|
||||
state.Register((*tunEndpoint)(nil))
|
||||
state.Register((*tunEndpointRefs)(nil))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue