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

Make hiddenpaths registration work both locally and remotely #4376

Merged
merged 35 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0a5f12b
hidden_paths: Enable registration of hiddenpaths locally.
jiceatscion Aug 10, 2023
5fb135b
hidden_paths: fix mock for path. New method Interfaces() is missing.
jiceatscion Aug 10, 2023
9cd4df8
hidden_paths: fix wrong signature of Interfaces() method in mocks.
jiceatscion Aug 10, 2023
e2b8f7b
hidden_paths: fix mocks, take two.
jiceatscion Aug 10, 2023
ecfb97c
hidden_paths: yet another test Path implementation that lacked the In…
jiceatscion Aug 10, 2023
21e1da6
hidden_paths: must commit generated go mocks.
jiceatscion Aug 10, 2023
ed60241
hidden_paths: A less disruptive solution to the registry addressing.
jiceatscion Aug 16, 2023
ac6a9cd
hidden_paths: Slight change of approach to address configuration.
jiceatscion Aug 17, 2023
13f2f76
Comply with lint's admonitions
jiceatscion Aug 18, 2023
3ca68f6
update mocks
jiceatscion Aug 18, 2023
0c24724
resolver_service: Make the service resolution port dynamic by default.
jiceatscion Aug 18, 2023
91fcc94
Merge branch 'master' of github.com:scionproto/scion into hiddenpaths
jiceatscion Aug 21, 2023
b0983d8
hidden_paths: satisfy lint's formatting preferences.
jiceatscion Aug 21, 2023
814522f
hidden_paths: Simplifications - the Resolver address now always has a…
jiceatscion Aug 22, 2023
189b687
hidden_paths: removed abadonned change. The ServiceResolution address…
jiceatscion Aug 22, 2023
5b70948
hidden_paths: cleanup another leftover reference to teh service resol…
jiceatscion Aug 22, 2023
da7ab4f
hidden_paths: revert mocks for abandonned code.
jiceatscion Aug 22, 2023
eb032fa
hidden_paths: removed another remnant of ResolutionServiceAddress.
jiceatscion Aug 22, 2023
cdd27dc
hidden_paths: use the new config appraoch in tests - hs services have…
jiceatscion Aug 22, 2023
4d69965
hidden_paths: fixed the helper that fetches public addresses from topo.
jiceatscion Aug 23, 2023
b79c8d4
hidden_paths: better comment and remove unnecessary string conversions.
jiceatscion Aug 23, 2023
925e924
hidden_paths: code formatting.
jiceatscion Aug 23, 2023
8fbea89
hidden_paths: Simplified some more. Got rid of the IntraASTCPServer f…
jiceatscion Aug 23, 2023
5376bc4
hidden_paths: Ensure that intraAS paths have metadata.
jiceatscion Aug 24, 2023
59e9b6c
hidden_paths: remove the Interfaces method from the Path interface.
jiceatscion Aug 24, 2023
9f9d418
hidden_paths: fix docstring.
jiceatscion Aug 24, 2023
625def5
hidden_paths: removed leftover reference to Interfaces().
jiceatscion Aug 24, 2023
4fda540
hidden_paths: update mocks.
jiceatscion Aug 24, 2023
ac87cde
hidden_paths: fix formatting.
jiceatscion Aug 24, 2023
d1e9dbd
hidden_paths: fix more formatting
jiceatscion Aug 24, 2023
d7c8d15
hidden_paths: moved intraAS.go to teh appnet pkg.
jiceatscion Aug 25, 2023
deed435
hidden_paths: add an empty dataplanePath to intraAS paths so they are…
jiceatscion Aug 25, 2023
2373845
hidden_paths: renamed intraAS.go as intra_as.go.
jiceatscion Aug 25, 2023
3e92748
hidden_paths: renamed intraAS.go to intra_as.go
jiceatscion Aug 25, 2023
ca14667
Merge branch 'master' into hiddenpaths
matzf Aug 29, 2023
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
Prev Previous commit
Next Next commit
hidden_paths: moved intraAS.go to teh appnet pkg.
  • Loading branch information
jiceatscion committed Aug 25, 2023
commit d7c8d15addd2cbe830b33c876a3a699bbd577c61
1 change: 0 additions & 1 deletion pkg/snet/path/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go_library(
srcs = [
"empty.go",
"epic.go",
"intraAS.go",
"onehop.go",
"path.go",
"scion.go",
Expand Down
2 changes: 2 additions & 0 deletions private/app/appnet/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go_library(
srcs = [
"addr.go",
"infraenv.go",
"intraAS.go",
],
importpath = "github.com/scionproto/scion/private/app/appnet",
visibility = ["//visibility:public"],
Expand All @@ -13,6 +14,7 @@ go_library(
"//pkg/daemon:go_default_library",
"//pkg/log:go_default_library",
"//pkg/private/serrors:go_default_library",
"//pkg/slayers/path:go_default_library",
"//pkg/snet:go_default_library",
"//pkg/snet/path:go_default_library",
"//pkg/snet/squic:go_default_library",
Expand Down
3 changes: 1 addition & 2 deletions private/app/appnet/infraenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import (
"github.com/scionproto/scion/pkg/log"
"github.com/scionproto/scion/pkg/private/serrors"
"github.com/scionproto/scion/pkg/snet"
"github.com/scionproto/scion/pkg/snet/path"
"github.com/scionproto/scion/pkg/snet/squic"
"github.com/scionproto/scion/pkg/sock/reliable"
"github.com/scionproto/scion/pkg/sock/reliable/reconnect"
Expand Down Expand Up @@ -225,7 +224,7 @@ func (nc *NetworkConfig) AddressRewriter(
}
}
return &AddressRewriter{
Router: &snet.BaseRouter{Querier: path.IntraASPathQuerier{IA: nc.IA, MTU: nc.MTU}},
Router: &snet.BaseRouter{Querier: IntraASPathQuerier{IA: nc.IA, MTU: nc.MTU}},
SVCRouter: nc.SVCResolver,
Resolver: &svc.Resolver{
LocalIA: nc.IA,
Expand Down
19 changes: 6 additions & 13 deletions pkg/snet/path/intraAS.go → private/app/appnet/intraAS.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package path implements snet.Path with full metadata
// This is used by libraries that provide paths for applications to use, such
// as the path combinator and the SCION Daemon API. Applications using snet will not
// usually make use of this package directly.
//
// This component implements a path querier that returns only paths
// within the local AS in the form of a standard Path with metadata
// but zero hops.

package path
package appnet

import (
"context"
Expand All @@ -30,20 +21,22 @@ import (
"github.com/scionproto/scion/pkg/addr"
rawpath "github.com/scionproto/scion/pkg/slayers/path"
"github.com/scionproto/scion/pkg/snet"
"github.com/scionproto/scion/pkg/snet/path"
)

// IntraASPathQuerier implements the PathQuerier interface. It will only provide
// AS internal paths, i.e., empty paths with only the IA as destination. This
// AS-internal paths, i.e., zero-hops paths with only the IA as destination. This
// should only be used in places where you know that you only need to
// communicate inside the AS.
// communicate inside the AS. The type of Path returned is a complete
// implementation with proper metadata.
type IntraASPathQuerier struct {
IA addr.IA
MTU uint16
}

// Query implements PathQuerier.
func (q IntraASPathQuerier) Query(_ context.Context, _ addr.IA) ([]snet.Path, error) {
return []snet.Path{Path{
return []snet.Path{path.Path{
Src: q.IA,
Dst: q.IA,
Meta: snet.PathMetadata{
Expand Down
Loading