anchor.diff:      {0, true} -> PktF=[SOAREC,NSREC,Pkt], Cnt=3;
       _Else -> PktF=Pkt, Cnt=1
     end,
  -  %ioc2rpz_fun:logMessage("Zone ~p, Last packet ACOUNT ~p, packets ~p ~n",[Zone#rpz.zone_str,ACount,(PktN+1)]), %TODO Debug
  +  %ioc2rpz_fun:logMessage("Zone ~p, Last packet ACOUNT ~p, packets ~p, Cnt ~p ~n",[Zone#rpz.zone_str,ACount,(PktN+1),Cnt]), %TODO Debug
     if (DBOp == send) or (DBOp == sendNcache) or (DBOp == sendNhotcache) or (DBOp == ixfr) ->
       if TSIG /= [] ->
         {ok,TSIGRR,_}=add_TSIG(list_to_binary([PktH, <<(ACount+Cnt):16,0:16,0:16>>, Questions, PktF, SOAREC]),TSIG),
  
positive.code: 
  %%%TCP accept
  handle_cast(accept, State = #state{socket=ListenSocket, tls=no, params=[Pid,Proc]}) ->
    {ok, AcceptSocket} = gen_tcp:accept(ListenSocket),
    %% Boot a new listener to replace this one.
    ioc2rpz_proc_sup:start_socket(Proc),
    {noreply, State#state{socket=AcceptSocket, tls=no, params=[Pid,Proc]}};
  
  %%%TLS accept
  handle_cast(accept, State = #state{socket=ListenSocket, tls=yes, params=[Pid,Proc]}) ->
    {ok, TLSTransportSocket} = ssl:transport_accept(ListenSocket),
    {ok, AcceptSocket} = ssl:handshake(TLSTransportSocket),
    %% Boot a new listener to replace this one.
    ioc2rpz_proc_sup:start_socket(Proc),
    {noreply, State#state{socket=AcceptSocket, tls=yes, params=[Pid,Proc]}};
  
  handle_cast(_, State) ->
    {noreply, State}.
  
negative.code:     end,
      %PktLen = byte_size(Pkt1),
      %Pkt2 = [<<PktLen:16>>,Pkt1], %send, cache, sendNcache, sendNhotcache
      ioc2rpz_fun:logMessage("Empty zone. CNT ~p ~n", [Cnt]),
      send_dns(Socket,Pkt1, [Proto,addlen]);
      true -> ok
    end,
    %if IXFR -> пустой зоны должно не быть, но на всякий случай можно предусмотреть передачу только SOA
    if (DBOp == cache) or (DBOp == sendNcache) ->
      ioc2rpz_db:write_db_pkt(Zone, {0,0,0,0, []}); % was 0,3,0,0 <- 3 was wrong here because we didn't add SOA/NS/SOA to the empty zone
      true -> ok
    end,
    if DBOp == sendNhotcache ->
      CTime=ioc2rpz_fun:curr_serial_60(),%erlang:system_time(seconds),
      ets:insert(rpz_hotcache_table, {{pkthotcache,Zone#rpz.zone,PktN},CTime, term_to_binary({0,0,0,0, []},[{compressed,?Compression}])}); %looks like the same issue as above was 0,3,0,0
      true -> ok
    end,
  	{ok, 0, 0};
  