aporeto-inc / trireme-lib

Simple, scalable and secure application segmentation
https://trireme.io
Apache License 2.0
300 stars 51 forks source link

About using your simple example trireme-example controller to instantiate the problem. . . #906

Open likhita-8091 opened 5 years ago

likhita-8091 commented 5 years ago

Controller instantiation in trireme-example/triremecli/cli.go: line 102 // Initialize the controllers ctrl := controller.New("ExampleNode", controllerOptions...)

But the new lib library new is not the same as the latest lib library config structure field.

before: d704b98b591b02097a3ada68d9b64db now: 02b53b84539257f31eb73f76f724789

Why is this field necessary? I think controller.New() --> newTrireme(c) --> t.newEnforcers() -> enforcer.New() --> nfqdatapath.New(***) --> d.SetTargetNetworks(cfg) --> cfg.TCPTargetNetworks This throws a pannic. Because cfg is nil. This is when the config structure is instantiated, no assignment is made.