Skip to content

Commit

Permalink
Fix issue with storing invalid URL in interpose registry (networkserv…
Browse files Browse the repository at this point in the history
…icemesh#574)

* Fix excludePrefixesServer

Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>

* Fix nsmgr registry chain order

Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
Signed-off-by: Sergey Ershov <sergey.ershov@xored.com>
  • Loading branch information
Vladimir Popov authored and Sergey Ershov committed Dec 20, 2020
1 parent e162bb5 commit 6bd3593
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/networkservice/chains/nsmgr/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ func NewServer(ctx context.Context, nsmRegistration *registryapi.NetworkServiceE
nsChain := chain_registry.NewNetworkServiceRegistryServer(nsRegistry)
nseChain := chain_registry.NewNetworkServiceEndpointRegistryServer(
nilEndpointFilter(
urlsRegistryServer,
newRecvFDEndpointRegistry(), // Allow to receive a passed files
interposeRegistry, // Store cross connect NSEs
localbypassRegistryServer, // Store endpoint Id to EndpointURL for local access.
urlsRegistryServer,
interposeRegistry, // Store cross connect NSEs
localbypassRegistryServer, // Store endpoint Id to EndpointURL for local access.
seturl.NewNetworkServiceEndpointRegistryServer(nsmRegistration.Url), // Remember endpoint URL
nseRegistry, // Register NSE inside Remote registry with ID assigned
)...,
Expand Down
3 changes: 3 additions & 0 deletions pkg/networkservice/common/excludedprefixes/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ func (eps *excludedPrefixesServer) Request(ctx context.Context, request *network
logger := trace.Log(ctx)

conn := request.GetConnection()
if conn.GetContext() == nil {
conn.Context = &networkservice.ConnectionContext{}
}
if conn.GetContext().GetIpContext() == nil {
conn.Context.IpContext = &networkservice.IPContext{}
}
Expand Down

0 comments on commit 6bd3593

Please sign in to comment.