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

[Feature Request] Customize multiple network adaptors IP addresses in hybrid Windows activation. #608

Open
lpwm opened this issue Dec 11, 2024 · 0 comments

Comments

@lpwm
Copy link

lpwm commented Dec 11, 2024

When I hybrid activate an on-premise Windows Server VM to SSM which has multiple network adaptors attached, SSM can only get the first adaptor's IP address whoes ifIndex property is the smallest and show it in the "General" panel. For example:

Get-NetIPAddress -AddressFamily IPv4 | Select-Object ifIndex,IPAddress

ifIndex IPAddress
------- ---------
      7 10.0.0.214
      4 10.0.0.211
      1 127.0.0.1

image

I've been reviewed the https://github.com/aws/amazon-ssm-agent/blob/mainline/agent/platform/platform.go it turns out this behavior is by design according to the function IP() line 92 sort the interfaces by index:

// IP of the network interface
func IP() (selected string, err error) {
	var interfaces []net.Interface
	if interfaces, err = net.Interfaces(); err == nil {
		interfaces = filterInterface(interfaces)
		sort.Sort(byIndex(interfaces))

Please consider add the support to customize the IP address sending to SSM when there're multiple network adaptors.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant