Changeset 868 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 05/04/16 10:44:29 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r867 r868 1619 1619 # Only try to update rDNS when the pool is flagged as "rDNS available" 1620 1620 if ($pinfo->{revavail} || $pinfo->{revpartial}) { 1621 _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user}); 1621 _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user}, 1622 location => $pinfo->{location}); 1622 1623 } 1623 1624 return ('OK', $args{cidr}); … … 1787 1788 if (($pinfo->{revavail} || $pinfo->{revpartial}) && ($args{rdns} || $args{iprev})) { 1788 1789 # the netblock/allocation... 1789 _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user}); 1790 _rpc('addOrUpdateRevRec', cidr => "$args{cidr}", name => $args{rdns}, rpcuser => $args{user}, 1791 location => $pinfo->{location}); 1790 1792 # ...and the per-IP set, if there is one. 1791 _rpc('updateRevSet', %{$args{iprev}}, rpcuser => $args{user} )1793 _rpc('updateRevSet', %{$args{iprev}}, rpcuser => $args{user}, location => $pinfo->{location}) 1792 1794 if keys (%{$args{iprev}}); 1793 1795 } … … 2100 2102 # should be safe to call unconditionally. 2101 2103 # Requires dnsadmin >= r678 2102 _rpc('updateRevSet', %fbset, rpcuser => $args{user} );2104 _rpc('updateRevSet', %fbset, rpcuser => $args{user}, location => $pinfo->{location}); 2103 2105 2104 2106 } else { 2105 2107 $binfo->{block} =~ s{/(?:32|128)$}{}; 2106 2108 # Only insert a record for IPv4, or actual single v6 IPs 2107 _rpc('addOrUpdateRevRec', cidr => $binfo->{block}, name => $args{rdns}, rpcuser => $args{user}) 2109 _rpc('addOrUpdateRevRec', cidr => $binfo->{block}, name => $args{rdns}, rpcuser => $args{user}, 2110 location => $pinfo->{location}) 2108 2111 if !$cidr->{isv6} || ($cidr->{isv6} && $cidr->masklen == 128); 2109 2112 2110 2113 # and the per-IP set, if there is one. 2111 _rpc('updateRevSet', cidr => $binfo->{block}, %{$args{iprev}}, rpcuser => $args{user}, location => $pinfo->{location}) 2114 _rpc('updateRevSet', cidr => $binfo->{block}, %{$args{iprev}}, rpcuser => $args{user}, 2115 location => $pinfo->{location}) 2112 2116 if keys (%{$args{iprev}}); 2113 2117 2114 2118 # and fix up the template's CIDR if required 2115 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', rpcuser => $args{user}) 2119 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', 2120 rpcuser => $args{user}, location => $pinfo->{location}) 2116 2121 if $args{fbmerge}; 2117 2122 } … … 2314 2319 2315 2320 # Only try to update rDNS when the original block is flagged as "rDNS available" 2316 _rpc('splitTemplate', cidr => $binfo->{block}, newmask => $args{newmask}, rpcuser => $args{user}) 2321 _rpc('splitTemplate', cidr => $binfo->{block}, newmask => $args{newmask}, rpcuser => $args{user}, 2322 location => $binfo->{location}) 2317 2323 if ($binfo->{revavail} || $binfo->{revpartial}); 2318 2324 … … 2422 2428 2423 2429 # Only try to update rDNS when the original block is flagged as "rDNS available" 2424 _rpc('resizeTemplate', oldcidr => $binfo->{block}, newcidr => $newblock->network, rpcuser => $user) 2430 _rpc('resizeTemplate', oldcidr => $binfo->{block}, newcidr => $newblock->network, rpcuser => $user, 2431 location => $binfo->{location}) 2425 2432 if ($binfo->{revavail} || $binfo->{revpartial}); 2426 2433 … … 2773 2780 if ($args{scope} eq 'keepall') { 2774 2781 # Add new rDNS for new container 2775 _rpc('addOrUpdateRevRec', cidr => $binfo->{block}, name => $binfo->{rdns}, rpcuser => $args{user}); 2782 _rpc('addOrUpdateRevRec', cidr => $binfo->{block}, name => $binfo->{rdns}, rpcuser => $args{user}, 2783 location => $binfo->{location}); 2776 2784 2777 2785 } else { 2778 2786 # Resize rDNS template for $prime 2779 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', rpcuser => $args{user}); 2787 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', 2788 rpcuser => $args{user}, location => $binfo->{location}); 2780 2789 2781 2790 # Assemble a list of blocks to delete... … … 2790 2799 $cidrlist =~ s/,$//; 2791 2800 _rpc('delRevSet', cidrlist => $cidrlist, rpcuser => $args{user}, delforward => 'y', delsubs => 'n', 2792 parpatt => $pinfo->{rdns} );2801 parpatt => $pinfo->{rdns}, location => $binfo->{location}); 2793 2802 2794 2803 } elsif ($args{scope} eq 'clearpeer') { … … 2796 2805 $cidrlist =~ s/,$//; 2797 2806 _rpc('delRevSet', cidrlist => $cidrlist, rpcuser => $args{user}, delforward => 'y', delsubs => 'y', 2798 parpatt => $pinfo->{rdns} )2807 parpatt => $pinfo->{rdns}, location => $binfo->{location}); 2799 2808 2800 2809 } elsif ($args{scope} eq 'clearall') { … … 2802 2811 $cidrlist .= $binfo->{block}; 2803 2812 _rpc('delRevSet', cidrlist => $cidrlist, rpcuser => $args{user}, delforward => 'y', delsubs => 'y', 2804 parpatt => $pinfo->{rdns} );2813 parpatt => $pinfo->{rdns}, location => $binfo->{location}); 2805 2814 2806 2815 } # scope, second level … … 2811 2820 2812 2821 # Resize rDNS template for $prime 2813 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', rpcuser => $args{user}); 2822 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', 2823 rpcuser => $args{user}, location => $binfo->{location}); 2814 2824 2815 2825 if ($args{scope} eq 'keepall' || $args{scope} eq 'mergepeer') { … … 2829 2839 # And do the calls. 2830 2840 _rpc('delRevSet', cidrlist => join(',', @dellist), rpcuser => $args{user}, delforward => 'y', delsubs => 'n', 2831 parpatt => $pinfo->{rdns} );2832 _rpc('templatesToRecords', templates => \@convlist, rpcuser => $args{user} );2841 parpatt => $pinfo->{rdns}, location => $binfo->{location}); 2842 _rpc('templatesToRecords', templates => \@convlist, rpcuser => $args{user}, location => $binfo->{location}); 2833 2843 2834 2844 } # scope eq 'keepall' || 'mergepeer' … … 2860 2870 # We delete ALL EVARYTHING in peer blocks... 2861 2871 _rpc('delRevSet', cidrlist => join(',', @fulldellist), rpcuser => $args{user}, delforward => 'y', 2862 delsubs => 'y', parpatt => $pinfo->{rdns}) if @fulldellist; 2872 delsubs => 'y', parpatt => $pinfo->{rdns}, location => $binfo->{location}) 2873 if @fulldellist; 2863 2874 # ... and just the template for container or pool templates in $prime... 2864 2875 _rpc('delRevSet', cidrlist => join(',', @dellist), rpcuser => $args{user}, delforward => 'y', 2865 delsubs => 'n', parpatt => $pinfo->{rdns}) if @dellist; 2876 delsubs => 'n', parpatt => $pinfo->{rdns}, location => $binfo->{location}) 2877 if @dellist; 2866 2878 # ... and convert a few to record groups 2867 _rpc('templatesToRecords', templates => \@convlist, rpcuser => $args{user}) if @convlist; 2879 _rpc('templatesToRecords', templates => \@convlist, rpcuser => $args{user}, 2880 location => $binfo->{location}) 2881 if @convlist; 2868 2882 } 2869 2883 if ($args{scope} eq 'clearall') { 2870 2884 # consider just doing join(',',$newblock->split($newblock->masklen+1))? 2871 2885 _rpc('delRevSet', cidrlist => join(',', @fulldellist, @dellist, @convlist, $binfo->{block}), 2872 rpcuser => $args{user}, delforward => 'y', delsubs => 'y', parpatt => $pinfo->{rdns}); 2886 rpcuser => $args{user}, delforward => 'y', delsubs => 'y', parpatt => $pinfo->{rdns}, 2887 location => $binfo->{location}); 2873 2888 } 2874 2889 … … 2879 2894 2880 2895 # Resize rDNS template for $prime 2881 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', rpcuser => $args{user}); 2896 _rpc('resizeTemplate', oldcidr => "$binfo->{block}", newcidr => $newblock->network.'', 2897 rpcuser => $args{user}, location => $binfo->{location}); 2882 2898 2883 2899 # Assemble a list of blocks to delete... … … 2889 2905 $cidrlist .= $binfo->{block}; 2890 2906 _rpc('delRevSet', cidrlist => $cidrlist, rpcuser => $args{user}, delforward => 'y', delsubs => 'y', 2891 parpatt => $pinfo->{rdns});2907 parpatt => $pinfo->{rdns}, location => $binfo->{location}); 2892 2908 2893 2909 } # type grouping for rDNS calls
Note:
See TracChangeset
for help on using the changeset viewer.