From 503ce9c154f9903ffd7699894b047b857cc05199 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Wed, 29 Sep 2021 10:41:30 +0200 Subject: [PATCH] agent: protos: Add a Family field to the Route payload Our check for the IP family is working as long as we have either a gateway or a destination IP. Some routes are missing both. The RT netlink messages provide the IP family information for each route, so we can carry that piece of information up to the guest. That will allow for a more reliable route IP family determination. Signed-off-by: Samuel Ortiz (cherry picked from commit 99450bd1f7858a4216abd05593520275adef6f79) --- src/agent/protocols/protos/types.proto | 1 + .../pkg/agent/protocols/grpc/health.pb.go | 15 +- .../pkg/agent/protocols/grpc/oci.pb.go | 159 ++++++++++++++---- .../pkg/agent/protocols/types.pb.go | 105 ++++++++---- 4 files changed, 212 insertions(+), 68 deletions(-) diff --git a/src/agent/protocols/protos/types.proto b/src/agent/protocols/protos/types.proto index 8ed1aa38a5..f2586ef915 100644 --- a/src/agent/protocols/protos/types.proto +++ b/src/agent/protocols/protos/types.proto @@ -46,6 +46,7 @@ message Route { string device = 3; string source = 4; uint32 scope = 5; + IPFamily family = 6; } message ARPNeighbor { diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go index 7a46e51a56..931605fb62 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go +++ b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/health.pb.go @@ -732,7 +732,10 @@ func (m *CheckRequest) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthHealth + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthHealth } if (iNdEx + skippy) > l { @@ -802,7 +805,10 @@ func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthHealth + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthHealth } if (iNdEx + skippy) > l { @@ -917,7 +923,10 @@ func (m *VersionCheckResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthHealth + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthHealth } if (iNdEx + skippy) > l { diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go index 2dc8fd757f..d19b61a7ed 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go +++ b/src/runtime/virtcontainers/pkg/agent/protocols/grpc/oci.pb.go @@ -7717,7 +7717,7 @@ func (m *Spec) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > postIndex { @@ -7842,7 +7842,10 @@ func (m *Spec) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -8251,7 +8254,10 @@ func (m *Process) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -8340,7 +8346,10 @@ func (m *Box) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -8537,7 +8546,10 @@ func (m *User) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -8748,7 +8760,10 @@ func (m *LinuxCapabilities) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -8869,7 +8884,10 @@ func (m *POSIXRlimit) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -9048,7 +9066,10 @@ func (m *Mount) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -9151,7 +9172,10 @@ func (m *Root) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -9304,7 +9328,10 @@ func (m *Hooks) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -9470,7 +9497,10 @@ func (m *Hook) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -9699,7 +9729,7 @@ func (m *Linux) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > postIndex { @@ -10052,7 +10082,10 @@ func (m *Linux) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -10135,7 +10168,10 @@ func (m *Windows) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -10218,7 +10254,10 @@ func (m *Solaris) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -10326,7 +10365,10 @@ func (m *LinuxIDMapping) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -10441,7 +10483,10 @@ func (m *LinuxNamespace) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -10651,7 +10696,10 @@ func (m *LinuxDevice) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -10950,7 +10998,10 @@ func (m *LinuxResources) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -11135,7 +11186,10 @@ func (m *LinuxMemory) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -11345,7 +11399,10 @@ func (m *LinuxCPU) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -11472,7 +11529,10 @@ func (m *LinuxWeightDevice) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -11580,7 +11640,10 @@ func (m *LinuxThrottleDevice) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -11839,7 +11902,10 @@ func (m *LinuxBlockIO) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -11909,7 +11975,10 @@ func (m *LinuxPids) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12082,7 +12151,10 @@ func (m *LinuxDeviceCgroup) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12186,7 +12258,10 @@ func (m *LinuxNetwork) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12288,7 +12363,10 @@ func (m *LinuxHugepageLimit) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12390,7 +12468,10 @@ func (m *LinuxInterfacePriority) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12571,7 +12652,10 @@ func (m *LinuxSeccomp) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12711,7 +12795,10 @@ func (m *LinuxSeccompArg) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12880,7 +12967,10 @@ func (m *LinuxSyscall) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { @@ -12963,7 +13053,10 @@ func (m *LinuxIntelRdt) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthOci + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthOci } if (iNdEx + skippy) > l { diff --git a/src/runtime/virtcontainers/pkg/agent/protocols/types.pb.go b/src/runtime/virtcontainers/pkg/agent/protocols/types.pb.go index 263afa8f16..c560a63bc6 100644 --- a/src/runtime/virtcontainers/pkg/agent/protocols/types.pb.go +++ b/src/runtime/virtcontainers/pkg/agent/protocols/types.pb.go @@ -147,6 +147,7 @@ type Route struct { Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` Scope uint32 `protobuf:"varint,5,opt,name=scope,proto3" json:"scope,omitempty"` + Family IPFamily `protobuf:"varint,6,opt,name=family,proto3,enum=types.IPFamily" json:"family,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -240,37 +241,37 @@ func init() { } var fileDescriptor_b0c68e5b9fabcd81 = []byte{ - // 472 bytes of a gzipped FileDescriptorProto + // 479 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x31, 0x8f, 0xd3, 0x30, 0x18, 0x86, 0xeb, 0xa6, 0xc9, 0x35, 0xae, 0x0e, 0x2a, 0x0b, 0x9d, 0x2c, 0x90, 0xa2, 0xa8, 0x0b, 0x11, 0x12, 0x8d, 0x54, 0x10, 0xfb,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, 0xee, 0x2d, 0xf8, 0xe7, 0xbd, 0x4d, 0xbe, + 0x01, 0x38, 0xba, 0x25, 0x8b, 0x0f, 0x3c, 0xcf, 0x36, 0x4b, 0x21, 0x4d, 0xbe, 0x5a, 0x9c, 0xc3, + 0xb3, 0x9a, 0xff, 0x9a, 0x6f, 0x67, 0x53, 0x47, 0x72, 0xff, 0x52, 0x72, 0x51, 0x98, 0xcf, 0xe0, + 0x64, 0xc5, 0x91, 0x95, 0xac, 0xa9, 0x76, 0x4e, 0x7c, 0xe2, 0xc0, 0x74, 0x5d, 0x92, 0xbe, 0xeb, + 0x5a, 0x78, 0xf5, 0x1c, 0x0e, 0x4f, 0x9a, 0x51, 0x00, 0xfb, 0xbb, 0xb7, 0xe3, 0x9e, 0xfd, 0x7d, + 0x37, 0x06, 0xef, 0xd5, 0xfd, 0x63, 0xd4, 0xfb, 0xf9, 0x18, 0xf5, 0xbe, 0x1e, 0x23, 0x70, 0x7f, + 0x8c, 0xc0, 0x8f, 0x63, 0x04, 0x1e, 0x8e, 0x11, 0xf8, 0xfc, 0xe9, 0x3f, 0x5f, 0x87, 0x6c, 0x2a, + 0x9d, 0x97, 0x3c, 0xdd, 0xe5, 0x52, 0x77, 0x96, 0xea, 0x6d, 0x76, 0xf9, 0x70, 0x96, 0x81, 0x2d, + 0xdf, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x21, 0x00, 0xa1, 0xc2, 0x81, 0x03, 0x00, 0x00, } func (m *IPAddress) Marshal() (dAtA []byte, err error) { @@ -429,6 +430,11 @@ func (m *Route) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.Family != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Family)) + i-- + dAtA[i] = 0x30 + } if m.Scope != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Scope)) i-- @@ -631,6 +637,9 @@ func (m *Route) Size() (n int) { if m.Scope != 0 { n += 1 + sovTypes(uint64(m.Scope)) } + if m.Family != 0 { + n += 1 + sovTypes(uint64(m.Family)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -719,6 +728,7 @@ func (this *Route) String() string { `Device:` + fmt.Sprintf("%v", this.Device) + `,`, `Source:` + fmt.Sprintf("%v", this.Source) + `,`, `Scope:` + fmt.Sprintf("%v", this.Scope) + `,`, + `Family:` + fmt.Sprintf("%v", this.Family) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") @@ -865,7 +875,10 @@ func (m *IPAddress) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -1148,7 +1161,10 @@ func (m *Interface) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -1340,13 +1356,35 @@ func (m *Route) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Family", wireType) + } + m.Family = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Family |= IPFamily(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { @@ -1535,7 +1573,10 @@ func (m *ARPNeighbor) Unmarshal(dAtA []byte) error { if err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l {