Skip to content

Commit

Permalink
scion-pki: use dispatcher path for probing
Browse files Browse the repository at this point in the history
Enable the path probing in the scion-pki tool to use the dispatcher
path from the env flags.

GitOrigin-RevId: c2dfbe020eeb760c420ef6ce8373413286db3788
  • Loading branch information
oncilla authored and lukedirtwalker committed Nov 18, 2021
1 parent 30ee56c commit 6dc75db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions go/pkg/app/path/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func filterUnhealthy(
LocalIP: cfg.LocalIP,
ID: uint16(rand.Uint32()),
SCIONPacketConnMetrics: cfg.SCIONPacketConnMetrics,
Dispatcher: cfg.Dispatcher,
}.GetStatuses(subCtx, nonEmptyPaths)
if err != nil {
return nil, serrors.WrapStr("probing paths", err)
Expand Down Expand Up @@ -281,8 +282,10 @@ func (cs ColorScheme) Path(path snet.Path) string {
}

type ProbeConfig struct {
LocalIA addr.IA
LocalIP net.IP
LocalIA addr.IA
LocalIP net.IP
Dispatcher string

// Metrics injected into Prober.
SCIONPacketConnMetrics snet.SCIONPacketConnMetrics
}
Expand Down
5 changes: 3 additions & 2 deletions go/scion-pki/certs/renew.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,9 @@ The template is expressed in JSON. A valid example:
}
if !flags.noProbe {
pathOpts = append(pathOpts, path.WithProbing(&path.ProbeConfig{
LocalIA: info.IA,
LocalIP: localIP,
LocalIA: info.IA,
LocalIP: localIP,
Dispatcher: dispatcher,
}))
}
path, err := path.Choose(ctx, sd, ca, pathOpts...)
Expand Down
5 changes: 3 additions & 2 deletions go/scion/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ On other errors, ping will exit with code 2.
}
if flags.healthyOnly {
opts = append(opts, path.WithProbing(&path.ProbeConfig{
LocalIA: info.IA,
LocalIP: localIP,
LocalIA: info.IA,
LocalIP: localIP,
Dispatcher: dispatcher,
}))
}
path, err := path.Choose(traceCtx, sd, remote.IA, opts...)
Expand Down

0 comments on commit 6dc75db

Please sign in to comment.