Skip to content

Commit

Permalink
updated change log; fix issue with fabric port
Browse files Browse the repository at this point in the history
  • Loading branch information
emoscardini committed Oct 10, 2024
1 parent a6210a7 commit 2596880
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.4] - 2024-10-10

### Fixed

- Fixed issue with help message on --jwt.
- Fixed issue with fabric port on ziti version above 30 if link listener was eneabled.

## [1.6.3] - 2024-09-25

- Add --skipSoftwareMgmtPortCheck to allow skipping just the software management port check.
Expand Down
32 changes: 16 additions & 16 deletions router_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ def check_port(ip_host, port, timeout):
if port == 6262:
logging.info("Found port 6262 closed - could be intentional")
return True
else:
logging.error("Socket error: %s", error)
return False
logging.error("Socket error: %s", error)
return False
finally:
socket_connection.close()

Expand Down Expand Up @@ -306,7 +305,7 @@ def create_parser():
:return: A Namespace containing arguments
"""
__version__ = '1.6.3'
__version__ = '1.6.4'
parser = argparse.ArgumentParser()

mgroup = parser.add_mutually_exclusive_group(required=True)
Expand Down Expand Up @@ -645,6 +644,13 @@ def handle_ziti_router_auto_enroll(args, router_info, enrollment_commands, regis
enrollment_commands.append('tls:0.0.0.0:443')
enrollment_commands.append(f"{args.edge}:443")

# set fabric_port depending on ziti version
fabric_port = 80
if ziti_router_auto_enroll.compare_semver(
router_info['productMetadata']['zitiVersion'],'0.30.0'
) >= 0:
fabric_port = 443

# if the setting was selected in the NetFoundry console
# if overriding the fabric listener add a manual linkListener
# Otherwise the auto_enroller will create one if passing in
Expand All @@ -653,8 +659,8 @@ def handle_ziti_router_auto_enroll(args, router_info, enrollment_commands, regis
if args.fabric:
enrollment_commands.append('--linkListeners')
enrollment_commands.append('transport')
enrollment_commands.append('tls:0.0.0.0:80')
enrollment_commands.append(f"tls:{args.fabric}:80")
enrollment_commands.append(f"tls:0.0.0.0:{fabric_port}")
enrollment_commands.append(f"tls:{args.fabric}:{fabric_port}")
else:
enrollment_commands.append('--assumePublic')

Expand Down Expand Up @@ -688,16 +694,10 @@ def handle_ziti_router_auto_enroll(args, router_info, enrollment_commands, regis
enrollment_commands.append(router_info['productMetadata']['zitiBinaryBundleLinuxAMD64'])


# check if ziti version is 0.30.0 or above
fabric_port = ziti_router_auto_enroll.compare_semver(
router_info['productMetadata']['zitiVersion'],'0.30.0'
)

# pass in fabric port 443 for versions 0.30.0 and above
if fabric_port >= 0:
logging.debug("Setting fabric port to 443")
enrollment_commands.append('--controllerFabricPort')
enrollment_commands.append('443')
# pass in fabric port
logging.debug("Setting fabric port to %s", fabric_port)
enrollment_commands.append('--controllerFabricPort')
enrollment_commands.append("{fabric_port}")

# add proxy if specified
if args.proxyAddress:
Expand Down

0 comments on commit 2596880

Please sign in to comment.