diff --git a/sendmail/lang/en b/sendmail/lang/en index ab031ada3..7315a72c0 100644 --- a/sendmail/lang/en +++ b/sendmail/lang/en @@ -815,6 +815,9 @@ ports_name=Port name ports_addr=Listen on address ports_all=All ports_ip=IP +ports_family=Protocol +ports_inet=IPv4 +ports_inet6=IPv6 ports_port=Listen on port ports_opts=Port options ports_mod_a=Require SMTP authentication diff --git a/sendmail/list_ports.cgi b/sendmail/list_ports.cgi index bc29b0e51..5ebca2f01 100755 --- a/sendmail/list_ports.cgi +++ b/sendmail/list_ports.cgi @@ -29,7 +29,7 @@ print &ui_columns_start([ ], 100); $i = 0; @tds = ( "valign=top", "valign=top", "valign=top" ); -@known_opts = ( 'Name', 'Address', 'Port', 'Modifiers' ); +@known_opts = ( 'Name', 'Address', 'Port', 'Modifiers', 'Family' ); foreach $p (@ports, { }) { @cols = ( ); foreach $k (@known_opts) { @@ -47,7 +47,13 @@ foreach $p (@ports, { }) { } push(@cols, &ui_textbox("name_$i", $p->{'Name'}, 10)); push(@cols, &ui_opt_textbox("addr_$i", $p->{'Address'}, 15, - $text{'ports_all'}, $text{'ports_ip'})); + $text{'ports_all'}, $text{'ports_ip'}). + "
\n". + $text{'ports_family'}." ". + &ui_select("family_$i", $p->{'Family'}, + [ [ '', $text{'default'} ], + [ 'inet', $text{'ports_inet'} ], + [ 'inet6', $text{'ports_inet6'} ] ])); push(@cols, &ui_opt_textbox("port_$i", $p->{'Port'}, 6, $text{'default'}." (25)")); @mods = ( ); diff --git a/sendmail/save_ports.cgi b/sendmail/save_ports.cgi index 00dc3546f..6a1d1233a 100755 --- a/sendmail/save_ports.cgi +++ b/sendmail/save_ports.cgi @@ -21,10 +21,16 @@ if (!$in{'ports_def'}) { # IP address if (!$in{"addr_${i}_def"}) { &check_ipaddress($in{"addr_$i"}) || + &check_ip6address($in{"addr_$i"}) || &error(&text('ports_eaddr', $i+1)); push(@opts, "Address=".$in{"addr_$i"}); } + # Family + if ($in{"family_${i}"}) { + push(@opts, "Family=".$in{"family_${i}"}); + } + # TCP port if (!$in{"port_${i}_def"}) { $in{"port_$i"} =~ /^\d+$/ && $in{"port_$i"} > 0 &&