File text manipulation

What I am trying to do is make a script that will add a port number within a section of a file if it already doesn't exist in that section of the file. The particular line that I would like to add the port number to in the file is formatted like this:

TCPPORTS="25 80 125 443 8080 10000"

For example, I would like to add the port 1701 to this series of numbers. inside the quotes, if it doesn't already exist. It would end up looking like the following:

TCPPORTS="25 80 125 443 8080 10000 1701"

I hope that is explained clearly enough.

Thanks

awk -vv=1701 '/TCPPORTS/ && !/1701/{sub(/"$/,FS v"\"")}1' file > newfile

untested:

sed '/1701/!s/.*/& 1701\x22/' file
awk 'BEGIN{FS=OFS="\""} /TCPPORTS/ && !/1701/ {$2=$2 " 1701"}1' infile