0

I am trying to use the golang RPC calls to pass the structures and I get a error while sending the structures.

Currently, whenever I am passing the CNI struct results with Ipv6 parameters then I get the following error:

gob: bad data: undefined type arrayType = strcut { CommonType CommonType = struct { Name string; Id int; }; Elem int; Len int; }

But, whenever I pass the Ipv4 structure I never get that error.

What can be the reason?

Please, let me know if you guys need more info.

My struct looks like this:

The CNI import of the Result struct:

"GitHub.com/containernetworking/cni/pkg/types/current"

type NetworkArgs struct {
Sandbox string
IfName string
Result *current.Result
}

My result looks like:

{ [{Name:eth0 Mac:92:26:b0:72:da:85 Sandbox:/proc/20314/ns/net}] [{Version:6 Interface:0xc42061be70 Address:{IP:2002:2:1:1::53 Mask:ffffffffffffffff0000000000000000} Gateway:2002:2:1:1::1}] [{Dst:{IP::: Mask:00000000000000000000000000000000} GW:2002:2:1:1::1}] {[] [] []}}

And I call the

client.Call(my_method, &NetworkArgs{sandbox, ifName, result}}, reply)
Invictus
  • 2,653
  • 8
  • 31
  • 50

0 Answers0