[Opendnssec-develop] Re: Key shananigans in 1.1.[12]

Rick van Rein rick at openfortress.nl
Tue Aug 24 13:52:35 UTC 2010


Sion,

I'm tracing KsmKeyGetUnallocated in ksm/ksm_key.c and repeating its query,

select *
from KEYDATA_VIEW
where policy_id=24
  and securitymodule_id=2
  and size=1024
  and algorithm=7
  and state=1
  and zone_id=143;

This would yield two keys.  But in KsmKeyGetUnallocated the requirement ends with

  ...
  and zone_id=NULL;

1. Why is "NULL" used here and not the zone?
2. "select NULL=NULL" never yields a positive reply, it should be
   "select NULL is NULL" (but I may be misreading your SQL-generators).

Does that help?


As for the direct cause: We traced this down to our web-developer accidentally removing all
zones and re-creating them.  Still, if the above is the problem, it seems important to
resolve it as it would likely pop up sometime.


Thanks,
 -Rick



More information about the Opendnssec-develop mailing list