You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
428 B
22 lines
428 B
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"go4.org/netipx"
|
|
)
|
|
|
|
func advertiseRoutes(set *netipx.IPSet) {
|
|
fmt.Println()
|
|
prefixes := set.Prefixes()
|
|
pfxs := make([]string, 0, len(prefixes))
|
|
for _, pfx := range prefixes {
|
|
pfxs = append(pfxs, pfx.String())
|
|
}
|
|
fmt.Printf("--advertise-routes=%s", strings.Join(pfxs, ","))
|
|
fmt.Println()
|
|
}
|
|
|