Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

details: nits from SCIONLab #4629

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/addr/fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func ParseFormattedAS(as string, opts ...FormatOption) (AS, error) {
}
as = trimmed
}
return parseAS(as, o.separator)
return ParseASSep(as, o.separator)
}

// FormatIA formats the ISD-AS.
Expand Down
4 changes: 2 additions & 2 deletions pkg/addr/isdas.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type AS uint64
// ParseAS parses an AS from a decimal (in the case of the 32bit BGP AS number
// space) or ipv6-style hex (in the case of SCION-only AS numbers) string.
func ParseAS(as string) (AS, error) {
return parseAS(as, ":")
return ParseASSep(as, ":")
}

// MustParseAS parses s and returns the corresponding addr.AS object. It panics
Expand All @@ -90,7 +90,7 @@ func MustParseAS(s string) AS {
return as
}

func parseAS(as string, sep string) (AS, error) {
func ParseASSep(as string, sep string) (AS, error) {
parts := strings.Split(as, sep)
if len(parts) == 1 {
// Must be a BGP AS, parse as 32-bit decimal number
Expand Down
3 changes: 2 additions & 1 deletion tools/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ func generateAllSrcDst(hostAddr HostAddr, unique bool) []IAPair {

type HostAddr func(ia addr.IA) *snet.UDPAddr

// CSAddr reads the CS host Addr from the topology for the specified IA.
// CSAddr reads the tester host Addr from the topology for the specified IA.
// If the address cannot be found, the CS address is returned.
var CSAddr HostAddr = func(ia addr.IA) *snet.UDPAddr {
if a := loadAddr(ia); a != nil {
return a
Expand Down
Loading