fixed function db_insert_primary_mac()