Skip to content

Commit

Permalink
Add printing of WireguardPeerEvent events (#850)
Browse files Browse the repository at this point in the history
* Add printing of WireguardPeerEvent events

Signed-off-by: NikitaSkrynnik <[email protected]>

* apply review comments

Signed-off-by: NikitaSkrynnik <[email protected]>

---------

Signed-off-by: NikitaSkrynnik <[email protected]>
  • Loading branch information
NikitaSkrynnik authored Aug 28, 2024
1 parent 441b551 commit 5db6156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/networkservice/up/peerup/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func waitForPeerUp(ctx context.Context, vppConn api.Connection, pubKey string, i
log.FromContext(ctx).Infof("failed to get any WireguardPeerEvents: %s", ctx.Err())
return errors.Wrap(ctx.Err(), "provided context is done")
case rawMsg := <-watcher.Events():
log.FromContext(ctx).Infof("got WireguardPeerEvent: %v, %v", rawMsg.GetMessageName(), rawMsg.GetMessageType())
log.FromContext(ctx).Infof("received WireguardPeerEvent: %v", rawMsg)
if msg, ok := rawMsg.(*wireguard.WireguardPeerEvent); ok &&
msg.PeerIndex == peerIndex &&
msg.Flags&wireguard.WIREGUARD_PEER_ESTABLISHED != 0 {
Expand Down

0 comments on commit 5db6156

Please sign in to comment.