|
@@ -67,7 +67,7 @@ print "dhcp-option=net:net-$subnet_name,option:router,$dhcp_conf{$subnet_name}->
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#get userid list
|
|
#get userid list
|
|
|
-my $sSQL="SELECT id,ip,ip_int,mac,comments,dns_name FROM User_auth where dhcp=1 and deleted=0 and ou_id !=".$default_user_ou_id." and ou_id !=".$default_hotspot_ou_id." ORDER by ip_int";
|
|
|
|
|
|
|
+my $sSQL="SELECT id,ip,ip_int,mac,comments,dns_name,dhcp_option_set,dhcp_acl FROM User_auth where dhcp=1 and deleted=0 and ou_id !=".$default_user_ou_id." and ou_id !=".$default_hotspot_ou_id." ORDER by ip_int";
|
|
|
my @users = get_records_sql($dbh,$sSQL);
|
|
my @users = get_records_sql($dbh,$sSQL);
|
|
|
foreach my $row (@users) {
|
|
foreach my $row (@users) {
|
|
|
next if (!$row);
|
|
next if (!$row);
|
|
@@ -78,6 +78,10 @@ if (exists $static_hole{$row->{ip}}) { $static_hole{$row->{ip}}{skip}=1; }
|
|
|
print '#Comment:'.$row->{comments}."\n" if ($row->{comments});
|
|
print '#Comment:'.$row->{comments}."\n" if ($row->{comments});
|
|
|
print '#DNS:'.$row->{dns_name}."\n" if ($row->{dns_name});
|
|
print '#DNS:'.$row->{dns_name}."\n" if ($row->{dns_name});
|
|
|
print 'dhcp-host='.$row->{mac}.', '.$row->{ip}."\n";
|
|
print 'dhcp-host='.$row->{mac}.', '.$row->{ip}."\n";
|
|
|
|
|
+if ($row->{dhcp_option_set}) {
|
|
|
|
|
+ print '#DHCP group:'.$row->{dhcp_option_set}."\n";
|
|
|
|
|
+ print 'dhcp-host=set:'.$row->{dhcp_option_set}.','.$row->{ip}."\n";
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
foreach my $ip (keys %static_hole) {
|
|
foreach my $ip (keys %static_hole) {
|