Handle named ports
authorJamie Cameron <jcameron@webmin.com>
Sat, 16 Feb 2008 22:18:01 +0000 (22:18 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 16 Feb 2008 22:18:01 +0000 (22:18 +0000)
sendmail/save_ports.cgi

index 4b9496f..00dc354 100644 (file)
@@ -29,6 +29,7 @@ if (!$in{'ports_def'}) {
                if (!$in{"port_${i}_def"}) {
                        $in{"port_$i"} =~ /^\d+$/ && $in{"port_$i"} > 0 &&
                            $in{"port_$i"} < 65536 ||
+                           getservbyname($in{"port_$i"}, "tcp") ||
                                &error(&text('ports_eport', $i+1));
                        push(@opts, "Port=".$in{"port_$i"});
                        }