jamf/Jamf-Environment-Test

UDP test shouldn't have -G flag set

Closed this issue · 0 comments

In the shell script the -G 3 TCP connection timeout flag is being set on UDP traffic:

# UDP goes direct... not proxied. 
STATUS=$(/usr/bin/nc -u -z -G 3 ${HOSTNAME} ${PORT} 2>&1 | /usr/bin/awk '{print $7}')

This results in the command failing to run:

~ % nc -u -z -G 3 time.apple.com 123
nc: TCP_CONNECTIONTIMEOUT: Invalid argument

Compared to running it without the flag:

~ % nc -u -z time.apple.com 123
Connection to time.apple.com port 123 [udp/ntp] succeeded!