@@ -492,6 +492,7 @@ context_set_tls_authentication(getdns_context *context, PyObject *py_value)
492
492
}
493
493
494
494
495
+ #if GETDNS_NUMERIC_VERSION > 0x00050000
495
496
int
496
497
context_set_tls_query_padding_blocksize (getdns_context * context , PyObject * py_value )
497
498
{
@@ -521,8 +522,9 @@ context_set_tls_query_padding_blocksize(getdns_context *context, PyObject *py_va
521
522
}
522
523
return 0 ;
523
524
}
525
+ #endif
524
526
525
-
527
+ #if GETDNS_NUMERIC_VERSION > 0x00050000
526
528
int
527
529
context_set_edns_client_subnet_private (getdns_context * context , PyObject * py_value )
528
530
{
@@ -556,7 +558,7 @@ context_set_edns_client_subnet_private(getdns_context *context, PyObject *py_val
556
558
}
557
559
return 0 ;
558
560
}
559
-
561
+ #endif
560
562
561
563
int
562
564
context_set_edns_version (getdns_context * context , PyObject * py_value )
@@ -1055,6 +1057,7 @@ context_getattro(PyObject *self, PyObject *nameobj)
1055
1057
return PyInt_FromLong (limit_outstanding_queries );
1056
1058
#endif
1057
1059
}
1060
+ #if GETDNS_NUMERIC_VERSION > 0x00050000
1058
1061
if (!strncmp (attrname , "tls_query_padding_blocksize" , strlen ("tls_query_padding_blocksize" ))) {
1059
1062
uint16_t tls_query_padding_blocksize ;
1060
1063
if ((ret = getdns_context_get_tls_query_padding_blocksize (context , & tls_query_padding_blocksize )) !=
@@ -1068,6 +1071,8 @@ context_getattro(PyObject *self, PyObject *nameobj)
1068
1071
return PyInt_FromLong ((long )tls_query_padding_blocksize );
1069
1072
#endif
1070
1073
}
1074
+ #endif
1075
+ #if GETDNS_NUMERIC_VERSION > 0x00050000
1071
1076
if (!strncmp (attrname , "edns_client_subnet_private" , strlen ("edns_client_subnet_private" ))) {
1072
1077
uint8_t edns_client_subnet_private ;
1073
1078
if ((ret = getdns_context_get_edns_client_subnet_private (context , & edns_client_subnet_private )) !=
@@ -1081,6 +1086,8 @@ context_getattro(PyObject *self, PyObject *nameobj)
1081
1086
return PyInt_FromLong ((long )edns_client_subnet_private );
1082
1087
#endif
1083
1088
}
1089
+ #endif
1090
+ #if GETDNS_NUMERIC_VERSION > 0x00050000
1084
1091
if (!strncmp (attrname , "tls_authentication" , strlen ("tls_authentication" ))) {
1085
1092
getdns_tls_authentication_t value ;
1086
1093
if ((ret = getdns_context_get_tls_authentication (context , & value )) !=
@@ -1094,6 +1101,7 @@ context_getattro(PyObject *self, PyObject *nameobj)
1094
1101
return PyInt_FromLong ((long )value );
1095
1102
#endif
1096
1103
}
1104
+ #endif
1097
1105
if (!strncmp (attrname , "follow_redirects" , strlen ("follow_redirects" ))) {
1098
1106
uint32_t follow_redirects ;
1099
1107
if ((ret = getdns_dict_get_int (all_context , "follow_redirects" ,
@@ -1232,7 +1240,9 @@ struct setter_table setters[] = {
1232
1240
{ "dnssec_allowed_skew" , context_set_dnssec_allowed_skew },
1233
1241
{ "dns_root_servers" , context_set_dns_root_servers },
1234
1242
{ "dns_transport_list" , context_set_dns_transport_list },
1243
+ #if GETDNS_NUMERIC_VERSION > 0x00050000
1235
1244
{ "edns_client_subnet_private" , context_set_edns_client_subnet_private },
1245
+ #endif
1236
1246
{ "edns_do_bit" , context_set_edns_do_bit },
1237
1247
{ "edns_extended_rcode" , context_set_edns_extended_rcode },
1238
1248
{ "edns_maximum_udp_payload_size" , context_set_edns_maximum_udp_payload_size },
@@ -1245,7 +1255,9 @@ struct setter_table setters[] = {
1245
1255
{ "suffix" , context_set_suffix },
1246
1256
{ "timeout" , context_set_timeout },
1247
1257
{ "tls_authentication" , context_set_tls_authentication },
1258
+ #if GETDNS_NUMERIC_VERSION > 0x00050000
1248
1259
{ "tls_query_padding_blocksize" , context_set_tls_query_padding_blocksize },
1260
+ #endif
1249
1261
{ "upstream_recursive_servers" , context_set_upstream_recursive_servers },
1250
1262
};
1251
1263
0 commit comments