Skip to content

Commit

Permalink
IPContext merged in begin chain element (#1231)
Browse files Browse the repository at this point in the history
Using the Client chain, the network service client cannot update the
IPContext without the mergeConnectionContext function implemented. A NSC
might want to update it if it needs to add, update or delete routes, src
IP addresses (VIPs...), policies...

Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
  • Loading branch information
LionelJouin committed Mar 3, 2022
1 parent 9d5c3f7 commit f054762
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/networkservice/common/begin/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ func mergeConnection(returnedConnection, requestedConnection, connection *networ
func mergeConnectionContext(returnedConnectionContext, requestedConnectionContext, connectioncontext *networkservice.ConnectionContext) *networkservice.ConnectionContext {
rv := proto.Clone(connectioncontext).(*networkservice.ConnectionContext)
if !proto.Equal(returnedConnectionContext, requestedConnectionContext) {
// TODO: IPContext, DNSContext, EthernetContext, do we need to do MTU?
// TODO: DNSContext, EthernetContext, do we need to do MTU?
rv.IpContext = requestedConnectionContext.IpContext
rv.ExtraContext = mergeMapStringString(returnedConnectionContext.GetExtraContext(), requestedConnectionContext.GetExtraContext(), connectioncontext.GetExtraContext())
}
return rv
Expand Down

0 comments on commit f054762

Please sign in to comment.