3 # Save the default route
5 require './qmail-lib.pl';
7 &error_setup($text{'rsave_err'});
8 @routes = &list_routes();
9 $old = $routes[$in{'idx'}] if ($in{'idx'} ne '');
11 if ($old && $in{'direct'}) {
15 &to_ipaddress($in{'defroute'}) || &to_ip6address($in{'defroute'}) ||
16 &error(&text('rsave_eto', $in{'defroute'}));
18 &modify_route($old, { 'from' => '',
19 'to' => $in{'defroute'} } );
22 &create_route({ 'from' => '',
23 'to' => $in{'defroute'} } );
26 &webmin_log("defroute", undef, undef, \%in);
27 &redirect("list_routes.cgi");