@ -134,6 +134,7 @@ var debugCmd = &ffcli.Command{
fs := newFlagSet ( "watch-ipn" )
fs := newFlagSet ( "watch-ipn" )
fs . BoolVar ( & watchIPNArgs . netmap , "netmap" , true , "include netmap in messages" )
fs . BoolVar ( & watchIPNArgs . netmap , "netmap" , true , "include netmap in messages" )
fs . BoolVar ( & watchIPNArgs . initial , "initial" , false , "include initial status" )
fs . BoolVar ( & watchIPNArgs . initial , "initial" , false , "include initial status" )
fs . BoolVar ( & watchIPNArgs . showPrivateKey , "show-private-key" , false , "include node private key in printed netmap" )
return fs
return fs
} ) ( ) ,
} ) ( ) ,
} ,
} ,
@ -319,8 +320,9 @@ func runPrefs(ctx context.Context, args []string) error {
}
}
var watchIPNArgs struct {
var watchIPNArgs struct {
netmap bool
netmap bool
initial bool
initial bool
showPrivateKey bool
}
}
func runWatchIPN ( ctx context . Context , args [ ] string ) error {
func runWatchIPN ( ctx context . Context , args [ ] string ) error {
@ -328,6 +330,9 @@ func runWatchIPN(ctx context.Context, args []string) error {
if watchIPNArgs . initial {
if watchIPNArgs . initial {
mask = ipn . NotifyInitialState | ipn . NotifyInitialPrefs | ipn . NotifyInitialNetMap
mask = ipn . NotifyInitialState | ipn . NotifyInitialPrefs | ipn . NotifyInitialNetMap
}
}
if ! watchIPNArgs . showPrivateKey {
mask |= ipn . NotifyNoPrivateKeys
}
watcher , err := localClient . WatchIPNBus ( ctx , mask )
watcher , err := localClient . WatchIPNBus ( ctx , mask )
if err != nil {
if err != nil {
return err
return err