1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
|
Changelog for the c-ares project. Generated with git2changes.pl
Version 1.16.1 (11 May 2020)
Brad House (11 May 2020)
- c-ares 1.16.1 release prep
- update travis to use xcode11.4
- Prevent possible double-free in ares_getaddrinfo() if ares_destroy() is called
In the event that ares_destroy() is called prior to ares_getaddrinfo() completing,
it would result in an invalid read and double-free due to calling end_hquery() twice.
Reported By: Jann Horn @ Google Project Zero
GitHub (30 Apr 2020)
- [shelley vohr brought this change]
fix: windows UNICODE incompatibilities with ares_getaddrinfo (#328)
Fixes the following compatibility issues:
* Use RegQueryValueExA instead of RegQueryValueEx
* Use ExpandEnvironmentStringsA instead of ExpandEnvironmentStrings
* Use RegOpenKeyExA instead of RegOpenKeyExA
* Use GetWindowsDirectoryA instead of GetWindowsDirectoryA
Fix By: Shelley Vohr (@codebytere)
Closes: #327
Brad House (13 Apr 2020)
- travis: CloudFlare does not allow T_ANY requests, so live tests that use it fail. Disable.
- travis: bump macos image to the latest
- cast-align warnings are false for struct sockaddr, silence
Create a macro to silence false cast-align warnings when casting
struct sockaddr * to struct sockaddr_in * and struct sockaddr_in6 *.
Fix By: Brad House (@bradh352)
- MacOS: Enable libresolv support for retrieving DNS servers like iOS does.
GitHub (10 Apr 2020)
- [Dmitry Igrishin brought this change]
CMake: Populate the INCLUDE_DIRECTORIES property of installed targets (#323)
Populate the INCLUDE_DIRECTORIES property of installed targets
Fix By: Dmitry Igrishin (@dmitigr)
Brad House (10 Apr 2020)
- travis: make valgrind use cmake for tests
- dont try to use libtool to run valgrind
- valgrind requires libtool installed to wrap tests
- scan build 7
- fix travis live test
- add debug for travis
- try without sudo
- attempt to modernize travis build environment
GitHub (6 Apr 2020)
- [Teemu R brought this change]
Allow TXT records on CHAOS qclass (#321)
Some DNS servers intentionally "misuse" the obsoleted CHAOS (CH) qclass to provide things like `version.bind`, `version.server`, `authors.bind`, `hostname.bind` and `id.server`.
C-ares was not allowing such use cases.
Fix By: Teemu R. (@rytilahti)
Brad House (5 Apr 2020)
- Remove warnings from ares_getaddrinfo.3 man page
As reported in #319, non-standard macros of .IN were used.
Replace with .RS/.RE.
Fixes: #319
Fix By: Brad House (@bradh352)
- ares_getaddrinfo man page render better for man2html
- update man pages to render better for man2html
Version 1.16.0 (12 Mar 2020)
Brad House (12 Mar 2020)
- 1.16.0 release notes draft
- attempt to fix double-free introduced in e0517f9
GitHub (12 Mar 2020)
- [David Drysdale brought this change]
test: fuzzer input triggering double free (#315)
OSS-Fuzz has reported a double-free with the fuzzer input file
included here; run with:
./test/aresfuzz test/fuzzinput/clusterfuzz-5637790584012800
Bisecting the failure points to commit e0517f97d988 ("Parse SOA records
from ns_t_any response (#103)")
- [Brad House brought this change]
CMake: Install Manpages (#314)
CMake wasn't installing manpages.
Fixes #297
Fix By: Brad House (@bradh352)
- [Brad House brought this change]
Enable cmake tests for AppVeyor (#313)
Tests require linking against the static library on Windows otherwise the symbols are not exported for internals being tested.
Fix By: Brad House (@bradh352)
Brad House (11 Mar 2020)
- Add AppVeyor badge
- bump c-ares version to 1.16.0. test AppVeyor integration.
GitHub (11 Mar 2020)
- [Brad House brought this change]
replace all usages of inet_addr() with ares_inet_pton() which is more proper (#312)
Replace usage of inet_addr() with ares_inet_pton() which is more appropriate and fixes issues with legitimate addresses like 255.255.255.0. IPv6 already used this.
Fixes #309
Fix By: Brad House (@bradh352)
- [Brad House brought this change]
CMake: Generate WinPDB files during build (#311)
Build and Install PDB (Windows Debug Symbol) files if supported by underlying system.
Also update AppVeyor to test cmake builds.
Fixes #245
Fix By: Piotr Pietraszkiewicz (@ppietrasa) and Brad House (@bradh352)
- [Brad House brought this change]
CMake: Rework library function checking (#310)
CHECK_LIBRARY_EXISTS(), while it takes a function name, does not actually verify the function exists in the library being evaluated. Instead, if the function is found in any dependent library, and the referenced library also exists, it returns true. This is not desirable.
Wrap with a Macro to change the behavior.
Fixes: #307
Fix By: Brad House (@bradh352)
- [Dron Rathore brought this change]
Parse SOA records from ns_t_any response (#103)
Added the capability of parsing SOA record from a response buffer of ns_t_any type query, this implementation doesn't interfere with existing T_SOA query's response as that too is treated as a list of records. The function returns ARES_EBADRESP if no SOA record is found(as per RFC).
The basic idea of sticking to RFC that a ns_t_any too should return an SOA record is something open for discussion but I have kept the functionality intact as it was previously i.e the function returns ARES_EBADRESP if it doesn't find a SOA record regardless of which response it is parsing i.e. T_SOA or T_ANY.
Note that asking for T_ANY is generally a bad idea:
- https://blog.cloudflare.com/what-happened-next-the-deprecation-of-any/
- https://tools.ietf.org/html/draft-ietf-dnsop-refuse-any
Bug: #102
Fix By: Dron Rathore (@DronRathore)
- [Stephen Bryant brought this change]
Added CPack functionality for generating RPM or DEB packages (#283)
Added CPack functionality for generating RPM or DEB packages
ie: run `cpack -G RPM` (or "DEB") after building with CMake.
The current configuration creates 3 separate packages for the shared library,
the development files and the tools.
Fix By: Stephen Bryant (@bf-bryants)
- [tjwalton brought this change]
ares_gethostbyname: Return ENODATA if no valid A or AAAA record found (#304)
ares_gethostbyname() was returning ESUCCESS when no A or AAAA record was found but a CNAME pointing nowhere was present. ENODATA should be returned instead, however the hosts pointer will still be present to provide the alias list.
* Return ENODATA if no valid A or AAAA record found
* Fix and update test ParseAReplyNoData.
* Add test for new ENODATA behaviour in ares_gethostbyname.
Fixes Bug #303
Fix By: @tjwalton
- [Michal Rostecki brought this change]
test: Separate live tests from SetServers* tests (#299)
Before this change, SetServers, SetServersPorts and SetServersCSV
contained test cases trying to make DNS queries with the google.com
hostname, which requires Internet connectivity. Tests with that
requirement should be defined in the ares-test-live.cc file and contain
"Live" prefix to filter them out with `--gtest_filter=-*.Live*` on
machines without Internet connectivity.
Fix By: Michal Rostecki (@mrostecki)
- [Adam Majer brought this change]
Only count valid addresses when response parsing (#302)
When ares_parse_a_reply or ares_parse_aaaa_reply is called in case
where another AAAA and A responses exist, the resulting ares_addrttl
count is invalid and the structure points to gibberish.
This is a regression since 1.15.
Issue: https://github.com/c-ares/c-ares/issues/300
Fix By: Adam Majer (@AdamMajer)
Brad House (24 Dec 2019)
- [Kyle Edwards brought this change]
CMake: Provide c-ares version in package export file (#296)
The CMake package export file should provide version information.
Fix By: Kyle Edwards (@KyleFromKitware)
- [Ben Noordhuis brought this change]
Accept invalid /etc/resolv.conf lookup values, ability to build container tests (#274)
* Add CARES_BUILD_CONTAINER_TESTS CMake option to add ability to build the Linux-only containerized tests.
* Accept invalid /etc/resolv.conf lookup values
Before this commit invalid `lookup` values resulted in c-ares not using
any lookups without any clear indication why. After this commit it uses
the default "fb".
Fix By: Ben Noordhuis (@bnoordhuis)
- [Christian Ammer brought this change]
Parallel A and AAAA lookups in `ares_getaddrinfo` (#290)
A and AAAA lookups for ares_getaddrinfo() are now performed in parallel.
For this change `ares_search` was removed from `ares_getaddrinfo`.
Instead `ares_query` in combination with `next_dns_lookup` are
doing the suffix search.
Adding support for `.onion` addresses which are tested by
`TEST_F(DefaultChannelTest, GetAddrinfoOnionDomain)`
Fix By: Christian Ammer (@ChristianAmmer)
- [Vy Nguyen brought this change]
Move variables into the block where it is used to avoid unused-vars (#281)
Warning uncovered with [-Werror, -Wunused-variables]
Fix By: Vy Nguyen (@oontvoo)
- [Vy Nguyen brought this change]
Rename local macros to avoid conflicting with system ones and remove unsed variables. (Otherwise code will break once compiled with [-Werror,-Wmacro-redefined,-Wunused-variable] ) (#280)
Fix new getaddrinfo code to not redefine macros on some systems.
Fix By: Vy Nguyen (@oontvoo)
- [Egor Pugin brought this change]
[ares_getenv] Return NULL in all cases. (#279)
if ares_getenv is defined, it must return a value on all platforms.
Fix By: Egor Pugin (@egorpugin)
- [Abhishek Arya brought this change]
Add OSS-Fuzz fuzzing badge (#278)
Adds based on instructions at
https://google.github.io/oss-fuzz/getting-started/new-project-guide/#status-badge
Patch By: Abhishek Arya (@inferno-chromium)
- [Peter Eisentraut brought this change]
ares_init_options.3: Fix layout (#275)
7e6af8e inserted the documentation of resolvconf_path in the middle of
the item for ednspsz, leading to broken layout. Fix that.
Fix By: Peter Eisentraut (@petere)
- [Gregor Jasny brought this change]
manpages: Fix typos detected by lintian (#269)
Fix By: Gregor Jasny (@gjasny)
- [lifenjoiner brought this change]
keep command line usage up to date (#256)
adig and ahost built-in help did not match args taken.
Fix-By: @lifenjoiner
- [Dan Noé brought this change]
ares-test.cc: Handle nullptr in AddrInfo ostream. (#268)
The const AddrInfo& argument to operator<< overload for AddrInfo can be
a nullptr unique_ptr. Handle this explicitly by printing {nullptr} if
the rest of the function cannot be safely executed.
Fix-by: Dan Noé <dpn@google.com>
- [Dan Noé brought this change]
Add missing limits.h include from ares_getaddrinfo.c (#267)
This files references INT_MAX, but does not include limits.h. This can
cause a build failure on some platforms. Include limits.h if we have it.
Fix-by: Dan Noé <dpn@google.com>
- [Andrew Selivanov brought this change]
fix fuzzer docs and add missing getaddrinfo docs (#265)
There is a fix for a bit outdated clang fuzzer docs and ares_getaddrinfo docs.
Fix By: Andrew Selivanov (@ki11roy)
- [Andrew Selivanov brought this change]
Fix leak and crash in ares_parse_a/aaaa_reply (#264)
* fix leak if naddress of particular type found
* fix segfault when wanted ttls count lesser than count of result records
* add fuzzer input files that trigger problems (from #263)
Reported-By: David Drysdale (@daviddrysdale)
Fix-By: Andrew Selivanov (@ki11roy)
- [Andrew Selivanov brought this change]
fix segfault when parsing wrong type of record (#262)
Fixes segfault when trying to ares_parse_aaaa with AF_INET and vise versa.
Fix By: Andrew Selivanov (@ki11roy)
- work around mingw compile failure
- c++ requires explicit casts
- support EnvValue on Windows by implementing setenv/unsetenv
- [Andrew Selivanov brought this change]
getaddrinfo enhancements (#257)
* Service support has been added to getaddrinfo.
* ares_parse_a/aaaa_record now share code with the addrinfo parser.
* Private ares_addrinfo structure with useful extensions such as ttls (including cname ttls),
as well as the ability to list multiple cnames in chain of lookups
Work By: Andrew Selivanov @ki11roy
- [Andrew Selivanov brought this change]
fix ares__sortaddrinfo, use wrappers for sock_funcs (#258)
Some socket functions weren't exposed for use by other areas of the library. Expose
those and make use of them in ares__sortaddrinfo().
Fix By: Andrew Selivanov (@ki11roy)
- Fix c89 compilation support broken by .onion rejection changes
Move .onion check lower after all variables have been declared.
Bug: #246
- [kedixa brought this change]
getaddrinfo: callback must be called on bad domain (#249)
Due to an order of incrementing the remaining queries and calling ares_query, on a bad domain
the registered callback wouldn't be called.
Bug: #248
Fixed-By: @kedixa
- [Darrin W. Cullop brought this change]
Windows ARM/ARM64 requires AdvApi32 (#252)
Fix link issues caused by missing library that appears to only be required on ARM (though
docs don't list this restriction). Doesn't hurt to require it everywhere.
Bug: #251
Fixed-By: Darrin Cullop (@dwcullop)
- [kedixa brought this change]
getaddrinfo: avoid infinite loop in case of NXDOMAIN(#240) (#242)
There are two possible causes for infinite loops fo NXDOMAIN, based on how many dots are in the domain name (one for < ARES_OPT_NDOTS and one for >= ARES_OPT_NDOTS), where it will repeat the same query over and over as the hquery->next_domain doesn't increment.
Fix By: @kedixa
- Portability fix for ares__sortaddrinfo()
replace uint32_t with unsigned int and socklen_t with ares_socklen_t
By: Brad House
- [Khaidi Chu brought this change]
fix: init bufp before reject .onion to make it can be free correctly (#241)
When querying a .onion domain, it returns directly without setting bufp to NULL. A subsequent free() that occurs can cause a segmentation fault.
Fix By: Khaidi Chu (@XadillaX)
- [Andrew Selivanov brought this change]
Add ares__sortaddrinfo() to support getaddrinfo() sorted results (#239)
This is a port of RFC 6724 compliant sorting function from Android Bionic project:
https://android.googlesource.com/platform/bionic/+/e919b116d35aa7deb24ddece69c491e24c3b0d6f/libc/netbsd/net/getaddrinfo.c
The latest version is essentially the same, except two additional parameters to test connection with (mark/uid):
https://android.googlesource.com/platform/bionic/+/master/libc/dns/net/getaddrinfo.c
Please note that even that version has some restrictions. It doesn't support some rules from RFC 6724:
Rule 3 (Avoid deprecated addresses)
Rule 4 (Prefer home addresses)
Rule 7 (Prefer native transport)
Submitted By: Andrew Selivanov (@ki11roy)
- [Christian Ammer brought this change]
Increase portability of `ares-test-mock-ai.cc` (#235)
* using portable ares_inet_pton and updated includes in ares-test-mock-ai
* forgot to remove deleted ares-test-ai.cc in Makefile.inc
Fix By: Christian Ammer (@ChristianAmmer)
- [Fabrice Fontaine brought this change]
m4/xc-cc-check.m4: use XC_CHECK_BUILD_FLAGS (#236)
Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS.
Otherwise it complains of CPPFLAGS in CFLAGS.
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/c-ares/0001-use_check_build_instead_of_check_user.patch]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Submitted by: Fabrice Fontaine
- [Christian Ammer brought this change]
Bugfix for `ares_getaddrinfo` and additional unit tests (#234)
This PullRequest fixes a bug in the function add_to_addrinfo which task is to add new addrinfo items to the ai_next linked list. Also additional unit tests for testing ares_getaddrinfo will be added:
Additional mock server test classes (ares-test-mock-ai.cc):
MockTCPChannelTestAI
MockExtraOptsTestAI
MockNoCheckRespChannelTestAI
MockEDNSChannelTestAI
RotateMultiMockTestAI
NoRotateMultiMockTestAI
Additional live tests (ares-test-live-ai.cc):
LiveGetHostByNameV4
LiveGetHostByNameV6
LiveGetHostByNameV4AndV6
Fix By: Christian Ammer (@ChristianAmmer)
- [Christian Ammer brought this change]
Remaining queries counter fix, additional unit tests for `ares_getaddrinfo` (#233)
Remaining queries counter fix, added tests (ParallelLookups,
SearchDomains, SearchDomainsServFailOnAAAA). Removed unnecessary
if and commented code in test.
Fix By: Christian Ammer (@ChristianAmmer)
- [Christian Ammer brought this change]
Add initial implementation for ares_getaddrinfo (#112)
Initial implementation for ares_getaddrinfo(). It is NOT compliant with RFC6724, though
it is expected to come closer to conformance prior to the next release.
Features not supported include sorted addresses and honoring of service and hints
parameters.
Implementation by: Christian Ammer (@ChristianAmmer)
- [Ben Noordhuis brought this change]
test: fix bad expectation in ipv6 localhost test (#227)
The LiveGetLocalhostByAddrV6 test expected to see "localhost" in the
result when doing an address-to-name lookup for ::1 but on my system
that resolves to "ip6-loopback" because of this stanza in /etc/hosts:
$ grep ^::1 /etc/hosts
::1 ip6-localhost ip6-loopback
Fix By: Ben Noordhuis (@bnoordhuis)
Bug: #85
- [Ben Noordhuis brought this change]
ares_version.h: bump version (#230)
Version change not committed from maketgz.sh
Bug: #229
Daniel Stenberg (24 Oct 2018)
- ares_library_init_android.3: minor syntax edits, fixed AVAILABILITY
Version 1.15.0 (23 Oct 2018)
Brad House (23 Oct 2018)
- last minute 1.15.0 addition
- [Ben Noordhuis brought this change]
Report ARES_ENOTFOUND for .onion domain names as per RFC7686. (#228)
Quoting RFC 7686:
Name Resolution APIs and Libraries (...) MUST either respond
to requests for .onion names by resolving them according to
[tor-rendezvous] or by responding with NXDOMAIN.
A legacy client may inadvertently attempt to resolve a .onion
name through the DNS. This causes a disclosure that the client
is attempting to use Tor to reach a specific service. Malicious
resolvers could be engineered to capture and record such leaks,
which might have very adverse consequences for the well-being
of the user.
Bug: #196
Fix By: Ben Noordhuis @bnoordhuis
- prepare for c-ares 1.15.0 release
- AIX Build Fix
AIX attempts to include both nameser_compat.h and onameser_compat.h. It appears
the proper fix is to define _USE_IRS so that only nameser_compat.h is used.
Bug: #224
Fix By: Brad House (@bradh352)
- Fix crash in ares_dup() due to new ARES_OPT_RESOLVCONF
ares_dup() calls ares_init_options() by making its own fake option
mask since the original mask isn't stored but ARES_OPT_RESOLVCONF
was always set, instead of conditionally set. This caused a crash
because ares_strdup() isn't NULL-safe if no custom path was set.
Made ares_dup() set ARES_OPT_RESOLVCONF conditionally.
Fix By: Brad House (@bradh352)
- [Sarat Addepalli brought this change]
Add ares_init_options() configurability for path to resolv.conf file
Add resolvconf_path to end of struct ares_options with ARES_OPT_RESOLVCONF option
so on Unix-like systems a custom path can be specified. If no path is specified,
/etc/resolv.conf is used like normal.
Fix By: Sarat Addepalli @SirR4T
Fixes Bug: #220
Review By: Brad House @bradh352
- remove stale variables
- fix prototype name for ares_strsplit_free()
- add missing prototype
- simplify ares_strsplit() and create ares_strsplit_free() helper function
- missing ares_strsplit.h from HHEADERS for inclusion in distribution
- [Ruslan Baratov brought this change]
Add CARES_BUILD_TOOLS CMake option (#214)
Add ability to exclude building of tools (adig, ahost, acountry) in CMake. This should also close #200.
Fix By: Ruslan Baratov (@ruslo)
Bug: #200
- [flyingdutchman23 brought this change]
Style. Whitespace cleanup. (#213)
Small whitespace cleanups.
Fix By: @flyingdutchman23
- [John Schember brought this change]
Android: Support for domain search suffix (#211)
Fixes issue #207. Uses LinkProperties.getDomains() to get a list of search domains and adds them to the suffix list. This also adds a new helper function to split strings into an array based on multiple delimiters replacing multiple other functions for dealing with string splitting.
Submitter: John Schember (@user-none)
Fixes: #207
Approved-by: Brad House (@bradh352)
- [afalin brought this change]
Improve DNS suffixes extracting from WinNT registry (#202)
Join all global and connection specific suffix lists. Use 'HKLM\Software\Policies\Microsoft\Windows NT\DNSClient\SearchList', 'HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Domain' as global suffix lists.
Fix By: @afalin
- Be consistent with indention in CMakeLists.txt
The imported TRANSFORM_MAKEFILE_INC function from curl used space indention
but the rest of the file used tabs. Go ahead and make it tabs for
consistency as well.
Committed By: Brad House
- [flyingdutchman23 brought this change]
Fix modern gcc warning: argument to 'sizeof' in 'strncpy' call is the same expression as the source
Silence warning about using src to determine number of bytes to copy.
In this case it doesn't matter whether it is `src` or `dest`. So there
is no functionality change.
Bug: #210
Fix By: @flyingdutchman23
- [Andi Schnebinger brought this change]
fix stringop-overflow warning of GCC (#201)
When using a modern GCC to compile c-ares, there is a stringop-overflow warning.
This patch simply silences the false-positive warning, there is no actual code flaw.
Bug: https://github.com/c-ares/c-ares/pull/201
Fixed By: Andi Schnebinger @Iniesta8
GitHub (18 May 2018)
- [David Drysdale brought this change]
travis: do coverage in "coverage" build (#195)
Fixes #194, a mistake from commit a255081f2c3c ("travis: Only do
coverage/distcheck on normal build")
Brad House (17 May 2018)
- [Brad Spencer brought this change]
Apply the IPv6 server blacklist to all nameserver sources, not just Windows (#193)
For #164, I mentioned that it seemed like the IPv6 nameserver blacklist should apply to all OSes. In a mailing list post, @bradh352 agreed and suggested that I file a PR to make it so.
This moves the blacklist check from being Windows-specific to being a general feature of config_nameservers(), no matter the nameserver source. It also simplifies the ares_ipv6_server_blacklisted() implementation to not parse and re-parse the blacklisted IPv6 addresses from strings on every check. I think they're almost as easy to read as a sequence of hex bytes in an array initializer, and it's definitely less work on each trip through the code.
Fix By: Brad Spencer @b-spencer
PR: https://github.com/c-ares/c-ares/pull/193
- [Brad Spencer brought this change]
Fix warnings emitted by MSVC when using -W4 (#192)
These changes fix a few warnings emitted by recent versions of MSVC when compiling with -W4. Half of the changes are in Windows-specific code, and the other half should be safe no matter the compiler or OS.
The allocation function change is probably the only one that needs explanation. MSVC gives warnings about the function pointers not being stable across DLL boundaries or something to that effect, so for Windows, I've made them be called indirectly, which at least made the compiler happy. I can't say I've tested every linking combination on Windows with them before or after the change, but it seems harmless.
Fix By: Brad Spencer @b-spencer
PR: https://github.com/c-ares/c-ares/pull/192
- [David Hotham brought this change]
Prevent changing name servers while queries are outstanding (#191)
Changing name servers doesn't work, per #41. Better to return an error code than to crash.
Fix-by: David Hotham @dimbleby
David Drysdale (15 May 2018)
- [Tobias Nießen brought this change]
Fix comment in ares_rules.h (#189)
Brad House (6 May 2018)
- [Brad Spencer brought this change]
Harden and rationalize c-ares timeout computation (#187)
* Harden and rationalize c-ares timeout computation
* Remove the rand() part of the timeout calculation completely.
When c-ares sends a DNS query, it computes the timeout for that request as follows:
timeplus = channel->timeout << (query->try_count / channel->nservers);
timeplus = (timeplus * (9 + (rand () & 7))) / 16;
I see two issues with this code. Firstly, when either try_count or channel->timeout are large enough, this can end up as an illegal shift.
Secondly, the algorithm for adding the random timeout (added in 2009) is surprising. The original commit that introduced this algorithm says it was done to avoid a "packet storm". But, the algorithm appears to only reduce the timeout by an amount proportional to the scaled timeout's magnitude. It isn't clear to me that, for example, cutting a 30 second timeout almost in half to roughly 17 seconds is appropriate. Even with the default timeout of 5000 ms, this algorithm computes values between 2812 ms and 5000 ms, which is enough to cause a slightly latent DNS response to get spuriously dropped.
If preventing the timers from all expiring at the same time really is desirable, then it seems better to extend the timeout by a small factor so that the application gets at least the timeout it asked for, and maybe a little more. In my experience, this is common practice for timeouts: applications expect that a timeout will happen at or after the designated time (but not before), allowing for delay in detecting and reporting the timeout. Furthermore, it seems like the timeout shouldn't be extended by very much (we don't want a 30 second timeout changing into a 45 second timeout, either).
Consider also the documentation of channel->timeout in ares_init_options():
The number of milliseconds each name server is given to respond to a query on the first try. (After the first try, the timeout algorithm becomes more complicated, but scales linearly with the value of timeout.) The default is five seconds.
In the current implementation, even the first try does not use the value that the user supplies; it will use anywhere between 56% and 100% of that value.
The attached patch attempts to address all of these concerns without trying to make the algorithm much more sophisticated. After performing a safe shift, this patch simply adds a small random timeout to the computed value of between 0 ms and 511 ms. I could see limiting the random amount to be no greater than a proportion of the configured magnitude, but I can't see scaling the random with the overall computed timeout. As far as I understand, the goal is just to schedule retries "not at the same exact time", so a small difference seems sufficient.
UPDATE: randomization removed.
Closes PR #187
Fix by: Brad Spencer
- distribute ares_android.h
Distribute ares_android.h when a release distribution package is
created.
Reported By: Andrey Khranovsky
Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-04/0000.shtml
- ares_set_servers_csv() on failure should not leave channel in a bad state
If bad data is passed to ares_set_servers_csv() or
ares_set_servers_ports_csv() it will clear the existing channel
configured DNS servers, then a call to ares_send() will fail due
to a bad malloc which may have undefined behavior.
The fix now only clears existing servers on success. An additional
sanity check was added in ares_send() to ensure nservers >= 1 or
will result in ARES_ESERVFAIL.
Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-03/0000.shtml
Reported-by: Francisco Sedano Crippa
- docs: Not all manpages are listed
Some docs aren't installed or not showing up on
https://c-ares.haxx.se/docs.html
due to not being listed in Makefile.inc. Add missing docs and
ensure docs are alphabetized.
Version 1.14.0 (16 Feb 2018)
Daniel Stenberg (16 Feb 2018)
- ares_android.c: fix warning: ISO C forbids an empty translation unit
- RELEASE-NOTES: some more work we did and people who helped
Brad House (16 Feb 2018)
- travis: skip Autotools style testing for cmake
Fix cmake test build by skipping autotools portion of test script.
- travis: standardize CMake test off of Autotools tests
Instead of running 'make test', run the tests directly like autotools
does. It provides more verbose output.
- travis: Enable building tests for CMake
Travis should auto-build and run tests for cmake builds now that
PR #168 is merged.
- fix version in pkgconfig
- Add version update to CMakeLists in maketgz
- Release prep. Add support for pkgconfig in cmake, set versions appropriately
Gregor Jasny (15 Feb 2018)
- CMake: Add tests
Brad House (14 Feb 2018)
- [Gregor Jasny brought this change]
Use cmake3 package provided by Ubuntu (#182)
- Cmake 3.1 instead of 3.2.1 should be the minimum
- Update RELEASE-NOTES and RELEASE-PROCEDURE.md to prepare for next release
- get rid of c++ style comments
- Use trusty for all builds, precise is EOL. Update clang and cmake versions.
- Current CMakeLists.txt doesn't support 2.8.12 anymore, we need to bump the version to 3.2.1 minimum
- Re-organize sections in INSTALL.md and add CMake section
- [Sergey Kolomenkin brought this change]
remove compilation warnings in MSVC (#47)
- document handling of timeouts for ares_process and ares_process_fd to close PR #57
- As per Issue #155, since we do not require gethostname() during init, if it fails, there's no reason for init to fail as it is only used to populate the domain
GitHub (7 Feb 2018)
- [David Drysdale brought this change]
Document WSAStartup requirement (#180)
David Drysdale (6 Feb 2018)
- [Antonio Tajuelo brought this change]
Added coderelease.io badge to readme.md for letting people subscribe to new versions (#174)
- [Sheel Bedi brought this change]
Update year in LICENSE.md to 2018 (#170)
GitHub (4 Feb 2018)
- [David Drysdale brought this change]
travis: use VM not container for {L,A}SAN builds (#177)
As per https://github.com/travis-ci/travis-ci/issues/9033, container
based builds do not currently allow ptrace, which is used by LSAN and
ASAN.
Brad House (3 Feb 2018)
- [acthompson-google-com brought this change]
Android JNI code leaks local references in some cases (#175)
* Add Google LLC to AUTHORS.
* android: Explicitly delete all JNI local references, and cache JNI method IDs at initialization.
* android: Only return ARES_ENOTINITIALIZED on failures in initialization code.
Gregor Jasny (2 Jan 2018)
- Embed fused Google Test 1.8.0
Brad House (21 Dec 2017)
- [John Schember brought this change]
android: Check returns for obj and classes are not NULL. Document API levels for various Android functions and objects used. (#166)
- CARES_CHECK_TYPE should reference variable so a warning is not produced for -Werror compatibility
- [Brad Spencer brought this change]
Fix computation of IPv6 blacklist mask for values of netmask > 8. (#164)
David Drysdale (14 Dec 2017)
- travis: Only do coverage/distcheck on normal build
- travis: only do pip install on Linux
- travis: only test in IPv4 mode
Travis' Trusty environment does not support IPv6.
- test: allow restriction to one IP address family
- [Roman Teterin brought this change]
Fix a typo in init_by_resolv_conf (#160)
Brad House (11 Dec 2017)
- @gvanem says MSVC -RTCc option fails, looks erroneous to me, but the additional mask is harmless
- Fix some other mingw warnings
- Issue #143, get rid of windows build warning due to passing 'char **' to argument expecting 'const char **'
- [Gregor Jasny brought this change]
Distribute CMake files (#130)
- Android variants may not have __system_property_get
Some android systems like ARM64 may not have the __system_property_get
symbol in libc (but still have it in the public headers). Detect this
condition at build time. The __system_property_get method of retrieving
name servers is deprecated as of Oreo so should strictly be a fallback
mechanism anyhow.
David Drysdale (9 Nov 2017)
- [David Hotham brought this change]
Wrong function name throughout man page (#154)
- ares_data.c: iterate through substructs when freeing
Previous code recursed into substructures, which makes it more likely
that large/heavily-nested responses could use up lots of stack.
- test: test ares_free_data on long chain of structs
- [Felix Yan brought this change]
Fix a typo in inet_ntop.c (#151)
Daniel Stenberg (29 Sep 2017)
- ares_gethostbyname.3: fix callback status values
- ARES_ENOTFOUND means the _name_ wasn't found
- ARES_ENODATA can be returned when a resolve fails
Reported-by: Jakub Hrozek
Bug: https://c-ares.haxx.se/mail/c-ares-archive-2011-06/0012.shtml
Brad House (28 Sep 2017)
- [John Schember brought this change]
Fix DNS server lookup breaking with Android O due to Android removing access to net.dns# system properties. (#148)
As of Android 8 (Oreo) access to net.dns# has been removed (https://developer.android.com/about/versions/oreo/android-8.0-changes.html). The reasoning given is that it, "improves privacy on the platform". Currently c-ares uses this to get the list of DNS servers.
Now the only way to access the DNS server list is by using the Connectivity Manager though Java. This adds the necessary JNI code to use the Connectivity Manager and pull the DNS server list. The old way using __system_property_get with net.dns# remains for compatibilty.
Using the Connectivity Manager requires the ACCESS_NETWORK_STATE permission to be set on the app. Existing applications most likely are not setting this and keeping the previous method as a fallback will at the very least ensure those apps don't break on older versions of Android. They will need to add this permission for Android 8 compatibility.
Included in the patch are two initalization functions which are required. The JVM must be registered as well as the Connectivity Manager itself. There is no way to get the Connectivity Manager except though Java. Either being passed down to C directly or by passing in an Android Context which can be used to get the Connectivity Manager. Examples are provided in the documentation.
- [Konstantinos Sofokleous brought this change]
allow linking against the static msvc runtime library (#133)
allow linking against the static msvc runtime library
- [Gergely Nagy brought this change]
Force using the ANSI versions of WinAPI functions (#142)
When compiling c-ares with a build system that defines UNICODE,
bad versions of WinAPI functions are used causing failures or even
crashes. When windows.h is included in MBCS mode (like in the default
build system), the ..A versions are the same as using the one without
any suffix.
- [cmake] build fix on Solaris
GitHub (11 Sep 2017)
- [Brad House brought this change]
Win32 exclude legacy ipv6 subnets (#144)
win32 ipv6: add infrastructure to exclude ipv6 subnets that are known to cause issues
- [David Drysdale brought this change]
windows: only look for ancient compilers (#146)
Also drop the use of a versioned output directory; just use
.\msvc
- [David Drysdale brought this change]
ares_init_options.3: match up sock_state_cb args (#141)
Fixes #140
Daniel Stenberg (25 Aug 2017)
- [Anna Henningsen brought this change]
gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()`
When `ares_cancel()` was invoked, `ares_gethostbyaddr()`
queries would fail with `ENOTFOUND` instead of `ECANCELLED`.
It seems appropriate to treat `ares_cancel()` like `ares_destroy()`,
but I would appreciate review of the correctness of this change.
Ref: https://github.com/nodejs/node/issues/14814
Closes #138
David Drysdale (18 Aug 2017)
- [David Hotham brought this change]
support most recent Visual Studio 2017
Brad House (26 Jul 2017)
- Preserve original DNS server order on Windows for equal metrics.
qsort is not stable, in order to make it stable we need to record
the original index and add it as a secondary sort value when the
metrics are equal to prevent using DNS servers that may not work
at all as reported by some users.
David Drysdale (15 Jul 2017)
- [Anna Henningsen brought this change]
ares_parse_naptr_reply: make buffer length check more accurate
9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check
for records parsed by `ares_parse_naptr_reply()`. However, that
function is designed to parse replies which also contain non-NAPTR
records; for A records, the `rr_len > 7` check will fail as there
are only 4 bytes of payload.
In particular, parsing ANY replies for NAPTR records was broken
by that patch.
Fix that by moving the check into the case in which it is already
known that the record is a NAPTR record.
- appveyor: run dnsdump as a sanity check
- travis: run dnsdump as a sanity check
- test: use ares_free_string() throughout
As pointed out by Gisle Vanem in #125.
Daniel Stenberg (3 Jul 2017)
- RELEASE-PROCEDURE.md: how to release
Fixes #115
Closes #116
David Drysdale (2 Jul 2017)
- test: Build dnsdump on Windows too
Thanks to Gisle Vanem for showing the way:
https://github.com/c-ares/c-ares/commit/b701af8a24cf9d173b1dbe5faedcea34642e92da#commitcomment-22830845
Brad House (26 Jun 2017)
- [Christian Ammer brought this change]
fix statement like #define - ares ssize_t define had a trailing semicolon (#120)
David Drysdale (21 Jun 2017)
- test: distribute the fuzzcheck.sh script
The TESTS target runs fuzzcheck.sh so make sure it is included
in the distributed tarball.
(The test itself will be pointless when run on a distribution, because
the fuzzing corpus directories are not shipped, but at least this
means that `make -C test test` should work.)
- test: run the name-parsing corpus check too
Daniel Stenberg (21 Jun 2017)
- dist: don't build/ship PDF versions in release archives
... experience says very few read them and they can still get build by
those who want them.a
- ares_version.h: bump version
Version 1.13.0 (20 Jun 2017)
Daniel Stenberg (20 Jun 2017)
- RELEASE-NOTES: 1.13.0
- ares_set_socket_functions.3: added in 1.13.0
David Drysdale (18 Jun 2017)
- ares_parse_naptr_reply: check sufficient data
Check that there is enough data for the required elements
of an NAPTR record (2 int16, 3 bytes for string lengths)
before processing a record.
- test: Feed in short NAPTR
- test: Add fuzz input with short NAPTR
- test: add ares_parse_naptr_reply to fuzzer
- [noiz brought this change]
Update ares.h to support compiling with QNX
- [Dionna Glaze brought this change]
Simple changes to appease stricter compilers.
ares_process.c uses htonl, which needs <arpa/inet.h> included.
ares_getnameinfo.c uses a dynamically selected format string for
sprintf, which -Wformat-literal doesn't like. Usually one would use
inttypes.h and a format string "%" PRIu32, but C99 is too new for some
supported platforms.
GitHub (16 Jun 2017)
- [Gregor Jasny brought this change]
CMake: Emulate interface library on import (#108)
Closes: #104
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Brad House (6 Jun 2017)
- [ChristianAmmer brought this change]
Added support for Windows DNS Suffix Search List (#93)
This change solves issue #53.
Support for suffix search lists was already built in for Linux. The search list could be set via set_search. With this change the suffix search list from Windows is read from the registry and then set into the ares configuration via set_search. There are two sources for the search list:
The global DNS suffix search list.
The primary and connection specific DNS suffixes if the global is not available.
Contributed by @ChristianAmmer
Daniel Stenberg (25 May 2017)
- [Thomas Köckerbauer brought this change]
configure: do not heck for ar if specified manually
Closes #62
David Drysdale (23 May 2017)
- ares_expand_name: limit number of indirections
- test: fuzz input file that takes a while to process
- test: copy data in fuzz regression driver
Oops.
GitHub (23 May 2017)
- [David Drysdale brought this change]
Convert char from ISO-8859-1 to UTF-8 (#99)
Fixes #97
- [Gregor Jasny brought this change]
travis: Use trusty for cmake builds (#109)
kubuntu-backports dropped the CMake package for Precise
David Drysdale (2 May 2017)
- [David Hotham brought this change]
msvc_ver.inc support most recent Visual Studio 2017 (#101)
- test: use io.h not unistd.h for Windows
- test: try building fuzz binaries on Windows
- test: stick to int in ares-fuzz.c
Using int rather than ares_ssize_t means this file
needs no c-ares dependency - it's a general driver for
any libFuzzer-style entrypoint.
- test: force ARES_OPT_NOROTATE for no-rotate tests
- test: check expected NOROTATE value
- ares_create_query: use ares_free not naked free
Accidentally added in commit 65c71be1cbe5
("ares_create_query: avoid single-byte buffer overwrite")
Brad House (17 Mar 2017)
- Need ares.h for ares_ssize_t
- tests should not use ssize_t, use ares_ssize_t
GitHub (16 Mar 2017)
- [Brad House brought this change]
Portability updates for legacy systems. (#92)
Socklen_t should not be used in code, instead ares_socklen_t should be used.
Convert ssize_t to ares_ssize_t for portability since the public API now exposes this.
David Drysdale (14 Mar 2017)
- [Michael Osei brought this change]
Update msvc_ver.inc (#91)
For Visual Studio 2017 builds
Daniel Stenberg (13 Mar 2017)
- [Brad House brought this change]
Windows DNS server sorting (#81)
Original Patch From Brad Spencer:
https://c-ares.haxx.se/mail/c-ares-archive-2016-04/0000.shtml
My modifications include:
* Dynamically find GetBestRoute2 since it is a Windows Vista+ symbol, and will fall back to prior behavior when not available.
* Prefer get_DNS_AdaptersAddresses as the modifications should alleviate the concerns which caused us to prefer get_DNS_NetworkParams
* Update AppVeyor to use MinGW-w64 instead of the legacy MinGW
* Fix compile error in test suite for Windows.
Original message from patch below:
From: Brad Spencer <bspencer@blackberry.com>
Date: Fri, 29 Apr 2016 14:26:23 -0300
On Windows, the c-ares DNS resolver tries first to get a full list of
DNS server addresses by enumerating the system's IPv4/v6 interfaces and
then getting the per-interface DNS server lists from those interfaces
and joining them together. The OS, at least in the way the c-ares
prefers to query them (which also may be the only or best way in some
environments), does not provide a unified list of DNS servers ordered
according to "current network conditions". Currently, c-ares will then
try to use them in whatever order the nested enumeration produces, which
may result in DNS requests being sent to servers on one interface
(hosting the current default route, for example) that are only intended
to be used via another interface (intended to be used when the first
interface is not available, for example). This, in turn, can lead to
spurious failures and timeouts simply because of the server address
order that resulted because of the enumeration process.
This patch makes the (safe?) assumption that there is no other better
rule to chose which interface's DNS server list should be prioritized.
After all, a DNS lookup isn't something "per network"; applications
don't look up "these DNS names on this interface and those DNS names on
that interface". There is a single resource pool of DNS servers and the
application should presume that any server will give it the "right"
answer. However, even if all DNS servers are assumed to give equally
useful responses, it is reasonable to expect that some DNS servers will
not accept requests on all interfaces. This patch avoids the problem by
sorting the DNS server addresses using the Windows IPv4/v6 routing tables.
For example, a request to DNS server C on interface 2 that is actually
sent over interface 1 (which may happen to have the default route) may
be rejected by or not delivered to DNS server C. So, better to use DNS
servers A and B associated with interface 1, at least as a first try.
By using the metric of the route to the DNS server itself as a proxy for
priority of the DNS server in the list, this patch is able to adapt
dynamically to changes in the interface list, the DNS server lists per
interface, which interfaces are active, the routing table, and so on,
while always picking a good "best" DNS server first.
In cases where any DNS server on any interface will do, this patch still
seems useful because it will prioritize a lower-metric route's (and thus
interface's) servers.
David Drysdale (22 Feb 2017)
- [Sergii Pylypenko brought this change]
docs: fixed references to ares_set_local_ip4 and ares_set_local_ip6
- [Calle Wilund brought this change]
ares test: fix win32 build errors with virtual socket function tests
The added api requires both some typedefs not previously imported
into the test build + the test code did not fully deal with
socket differences on windows.
- [Calle Wilund brought this change]
ares_process: fix return type of socket_create function (win32 warning)
Daniel Stenberg (31 Jan 2017)
- [Calle Wilund brought this change]
ares_set_socket_functions: Add man page
Providing some rudimentary documentation for the added functionality
Closes #72
- [Calle Wilund brought this change]
ares-test: Add test helpers and cases for virtual socket IO
* Added test case macro to automatically run tests twice, once "normal",
once with virtual IO.
* Changed most "live" query tests to run in dual mode to verify
at least simple socket IO via virtual functions
* Added test case for settings/duping socket functions & callback data
- [elcallio brought this change]
Implement using virtual socket IO functions when set
Uses virtual socket IO functions when set on a channel.
Note that no socket options are set, nor is any binding
done by the library in this case, since the client defining
these is probably more suited to deal with this.
- [elcallio brought this change]
Add virtual function set for socket IO
Defines a structure of basic create, close, read/write
functions as virtual function calls, settable for individual
c-ares channels.
David Drysdale (30 Jan 2017)
- test: ignore aresfuzzname binary
Gregor Jasny (14 Jan 2017)
- [Stephen Sorley brought this change]
Always use check_symbol_exists instead of check_function_exists.
- Also add includes to TARGETS_INST_DEST
- [Stephen Sorley brought this change]
Windows build fixes
- CMake: Export targets
- CMake: Use GNUInstallDirs for install location defaults
David Drysdale (11 Jan 2017)
- Update Makefile.am for renamed INSTALL.md
GitHub (11 Jan 2017)
- [David Drysdale brought this change]
docs: convert INSTALL to MarkDown & tweak (#83)
- [Gregor Jasny brought this change]
Merge pull request #77 from stephen-sorley/cmake_modernize
Updated CMake minimum version to 2.8.12.
Stephen Sorley (4 Jan 2017)
- Changed executables to depend directly on internal libcares target, instead of against
the external-facing alias targets.
- Updated Travis to pull CMake 2.8.12 from kubuntu-backports ppa.
- Updated CMake minimum version to 2.8.12.
Changed the way usage requirements (include dirs, compile defs, dependent libraries) are specified, to match the recommended standard practice for modern CMake. This involves using target-specific functions (target_include_directories, target_compile_definitions, etc.), along with the PUBLIC, PRIVATE or INTERFACE modifiers.
Updated chain-building support to imitate new-style Find modules (import libs), instead of old-style Find modules (cache variables).
David Drysdale (26 Dec 2016)
- [Chris Araman brought this change]
configure: clock_gettime workaround (#75)
Commits 7518c26, c41726b, and bc14ee7 brought this workaround to the CMake build system. This expands it to the autoconf build system.
Fixes #71
- test: add fuzz entrypoint for ares_create_query()
- test: Add gTest/gMock files to SOURCES
Built tarballs are not including all of the files needed
to build the test suite because they are missing from the
<target>_SOURCES variable in Makefile.am.
- travis: Move build scripts under travis/
Travis doesn't always propagate errors in inline multi-line
scripts, so move them all to be explicit shell scripts, each
with set -e.
- travis: check distributed tarball builds
Daniel Stenberg (25 Oct 2016)
- dist: ship msvc_ver.inc too
Reported-by: Bruce Stephens
Fixes #69
- [Aaron Bieber brought this change]
fix build on OpenBSD
- ares_version.h: bump, working on 1.12.1 now
GitHub (18 Oct 2016)
- [Gregor Jasny brought this change]
Merge pull request #64 from bradh352/master
Add CMake build system support to C-Ares.
Brad House (5 Oct 2016)
- suggested PROJECT_NAME change broke chain building as it needs the magic PROJECT_NAME set in the ADD_LIBRARY for matching. Fix to make both goals work
- update MacOSX 10.12 detection
- Expand XCode clock_gettime fix to include MacOS 10.12, not just iOS10
David Drysdale (4 Oct 2016)
- Revert "travis: work around bug in PyCParser"
This reverts commit a24a10a348fc00b8cfd684d91894a1df14880ea9.
- travis: work around bug in PyCParser
See https://github.com/pyca/cryptography/issues/3187
Brad House (3 Oct 2016)
- PROJECT_SOURCE_DIR instead of CMAKE_CURRENT_SOURCE_DIR as per @gjasny
- use a project name of c-ares as per @gjasny
- Import curl conversion of Makefile.inc to cmake form dynamically as per bdoetsch@ameritech.net to make maintaining multiple build systems easier
Daniel Stenberg (30 Sep 2016)
- dist: add ares_library_initialized.* to the tarball
David Drysdale (30 Sep 2016)
- test: check ares_create_query with too-long name
Daniel Stenberg (30 Sep 2016)
- man pages: minor formatting edits
Brad House (29 Sep 2016)
- merge fc7917e from @daviddrysdale ... travis build updates for cmake
- cleanups as per @gjasny ... Use naked IF statements and use NOT DEFINED
Version 1.12.0 (29 Sep 2016)
Daniel Stenberg (29 Sep 2016)
- RELEASE-NOTES: 1.12.0
- [David Drysdale brought this change]
ares-test-misc: test ares_create_query with escaped trailing dot
- ares_create_query: avoid single-byte buffer overwrite
... when the name ends with an escaped dot.
CVE-2016-5180
Bug: https://c-ares.haxx.se/adv_20160929.html
Brad House (29 Sep 2016)
- CMake: Unify library versioning with the libtool methodology to make keeping library versions in sync easier with the autotools build system
Daniel Stenberg (29 Sep 2016)
- ares_library_initialized.3: added
- make: bump CARES_VERSION_INFO for release
David Drysdale (29 Sep 2016)
- man: update ares_init_options.3
Daniel Stenberg (29 Sep 2016)
- ares_library_init.3: corrected the ares_library_init_mem proto
Brad House (28 Sep 2016)
- XCode v8 introduced clock_gettime() for iOS v10. However, it is a weak symbol, which means when earlier iOS versions try to use clock_gettime() it results in a crash due to the missing symbol. Detect this condition and do not set HAVE_CLOCK_GETTIME_MONOTONIC.
- Adds cmake build system support to C-Ares.
The patch does not modify any source files, it only adds 3 new files
(CMakelists.txt, ares_build.h.cmake, ares_config.h.cmake) which form the
build system. I've tried to go through as much of the autotools tests and
extracted what I thought was appropriate, though many of the tests aren't
as in-depth in CMake as they are for autotools ... it is unclear why some
of them exist at all, I'm guessing for legacy systems that CMake probably
doesn't support anyhow.
Building the library, and examples (adig, ahost, acountry) plus installation
should work across a large number of tested platforms. The tests have not
yet been integrated.
Daniel Stenberg (27 Sep 2016)
- README.md: remove space from link
- README: link to the correct c-ares badge!
Reported-by: David Hotham
Fixes #63
- docs: minor formatting edits
- ares_destroy.3: formatting polish
- ares_init.3: split the init docs into two separate man pages
- SECURITY: point to the vulnerabilities page now
- RELEASE-NOTES: synced with daa7235b1a5
- ares_create_query.3: edit language
Tried to make the man page more readable.
David Drysdale (26 Sep 2016)
- test: fix gMock to work with gcc >= 6.x
Taken from:
https://github.com/google/googletest/issues/705#issuecomment-235067917
Daniel Stenberg (26 Sep 2016)
- [Brad House brought this change]
headers: remove checks for and defines of variable sizes
... they're not really used and by avoiding them in the ares_build.h
output we make the public header less dependent on data sizes.
David Drysdale (24 Sep 2016)
- api: add ARES_OPT_NOROTATE optmask value
Fix up a couple of problems with configuring whether c-ares rotates
between different name servers between requests.
Firstly, ares_save_options() returns (in *optmask) the value of
(channel->optmask & ARES_OPT_ROTATE), which doesn't necessarily
indicate whether the channel is or is not actually doing rotation.
This can be confusing/incorrect if:
- the channel was originally configured without ARES_OPT_ROTATE
(so it appears that the channel is not rotating)
- the /etc/resolv.conf file includes the 'rotate' option
(so the channel is actually performing rotation).
Secondly, it is not possible to reliably configure a channel
to not-rotate; leaving off ARES_OPT_ROTATE is not enough, since
a 'rotate' option in /etc/resolv.conf will turn it on again.
Therefore:
- add an ARES_OPT_NOROTATE optmask value to allow explicit
configuration of no-rotate behaviour
- in ares_save_options(), report the value of channel->rotate
as exactly one of (optmask & ARES_OPT_ROTATE) or
(optmask & ARES_OPT_NOROTATE).
In terms of back-compatibility:
- existing apps that set ARES_OPT_ROTATE will continue to rotate,
and to have ARES_OPT_ROTATE reported back from ares_save_options()
- existing apps that don't set ARES_OPT_ROTATE will continue to
use local config/defaults to decide whether to rotate, and will
now get ARES_OPT_ROTATE or ARES_OPT_NOROTATE reported back from
ares_save_options() rather than 0.
- ares_init_options: only propagate init failures from options
Commit 46bb820be3a8 ("ares_init_options: don't lose init failure")
changed init behaviour so that earlier errors in initialization
weren't lost. In particular, if the user passes in specific
options but they are not applied (e.g. because of an allocation
failure), that failure needs to be reported back to the user; this
also applies when duplicating a channel with ares_dup().
However, other initialization failures can be ignored and
overridden -- in particular, if init_by_resolv_conf() or
init_by_environment() fail, then falling back to default values
is OK.
So only preserve failures from the init_by_options() stage, not
from all initialization stages.
Fixes issue 60.
- test: Force reinstall of libtool on OSX
Travis build environment appears to have changed.
- test: Add valgrind build variant
- test: Add null pointer to gtest args
GoogleTest assumes that there is a null pointer in argv[argc],
so make it look like that. Without this change, tests run with
command-line arguments get memory errors under valgrind/ASAN.
Daniel Stenberg (21 Aug 2016)
- AUTHOR: maybe gitgub isn't really an author =)
- AUTHORS: added contributors from the git log
- LICENSE.md: add a stand-alone license file
Just the MIT license used in the top the source files moved out to a
stand-alone file for easier reference and discovery.
- README: added "CII best practices" badge
- SECURITY.md: suggested "security process" for the project
David Drysdale (17 Aug 2016)
- test: Add Clang static analysis build to Travis
Run scan-build over the library source code, but skip the
tests. Needs a later Clang install in Travis
- test: more info on how to run fuzz testing
- test: make fuzzer driver code C not C++
- test: fuzzer mode for AFL's persistent mode
When fuzzing with AFL, if the LLVM-based instrumentation is
used (via the afl-clang-fast wrapper), then it is possible to
have a single execution of the fuzzer program iterate multiple
times over the fuzzing entrypoint (similar to libFuzzer's normal
mode of execution) with different data. This is much (e.g. 10x)
faster.
Add code to support this, by checking whether __AFL_LOOP is
defined at compile-time.
Also, shift the code to effectively be C rather than C++.
- test: simplify deps for fuzzer entrypoint
No need to depend on the rest of the test code (ares-test.h) for
the fuzzer entrypoint; this makes the entrypoint slightly simpler
to build with LLVM's libFuzzer.
Also shift the code to effectively be C rather than C++
- test: disable MinGW tests
The test binary built in the MinGW build is failing for some
reason. It works for me when I build locally, so I'm guessing
it's down to some sort of AppVeyor environment issue.
Disable for now.
Daniel Stenberg (16 Aug 2016)
- read_tcp_data: remove superfluous NULL check
CID 56884 by Coverity. The pointer is already derefenced before this
point so it can't be NULL here anyway.
- web: http => https
GitHub (20 Jul 2016)
- [David Drysdale brought this change]
Merge pull request #59 from fuze/master
Update msvc_ver.inc for VS2015 Update 3
- [Chris Araman brought this change]
Update msvc_ver.inc
support Visual Studio 2015 Update 3
David Drysdale (2 May 2016)
- Fix trailing comment for #endif
Daniel Stenberg (30 Apr 2016)
- email: use Gisle's "new" address
David Drysdale (18 Apr 2016)
- test: drop superfluous fuzz inputs
Where there are multiple fuzz input files that only differ in
the first two bytes (the query ID), just keep the first such
file.
svante karlsson (15 Apr 2016)
- Update msvc_ver.inc
support Visual Studio 2015 Update 2
David Drysdale (31 Mar 2016)
- test: Run fuzzcheck.sh in Travis build
- test: add fuzzing check script to tests
Add a test script that runs the fuzzing command over the
corpus of DNS packets. This doesn't actually do any fuzzing
(it just runs them as inputs without generating any variations)
but it does ensure that the fuzzing entrypoint is still working.
- test: allow multiple files in aresfuzz command line
If no arguments are specified, use stdin as input.
Otherwise treat each argument as a filename and feed
its contents to the fuzz entrypoint.
- test: Add corpus of DNS packets
For fuzz testing it is useful to start from a corpus of valid
packets, so fill out the test/fuzzinput/ directory with a bunch
of inputs.
These packets were generated by temporarily modifying the c-ares
process_answer() function to save off any incoming response messages.
- test: Add utility to show DNS packet from file
- [nordsturm brought this change]
Fix nsort initialization
Author: Alexander Drachevskiy
http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0004.shtml
http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0014.shtml
- test: Check setting nsort=0 option is respected
- test: Update fuzzing function prototype
libFuzzer changed expected return type from void to int
in LLVM 3.8.
- Explicitly clear struct servent before use
On a build where MSAN has been manually set up (which involves
using an MSAN-instrumented version of the standard C++ library, see
https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo)
there's a warning about use of uninitialized memory here. It
might be a false positive, but the fix is trivial so include it.
- test: for AF_UNSPEC, return CNAME only for AAAA, but valid A record
Also shuffle expected responses rsp6/rsp4 into the order they will occur.
- [Chris Araman brought this change]
msvc_ver.inc: support Visual Studio 2015 Update 1
- build: commonize MSVC version detection
Remove the need to copy/paste version number mapping between
Makefile.msvc and test/Makefile.msvc.
- test: Use different name in live test
- test: Only pass unused args to GoogleTest
- ahost.c: add cast to fix C++ compile
If ahost.c is force-compiled as C++ the missing cast from
(void *) to (char **) is problematic.
- ares_library_cleanup: reset ares_realloc too
Otherwise a subsequent use of the library might use a previous
incarnation's realloc() implementation.
Daniel Stenberg (9 Mar 2016)
- [Brad House brought this change]
configure: check if tests can get built before enabled
The current approach for disabling tests is not a good solution because
it forces you to pass --disable-tests, rather than auto-detect if your
system can support the tests in the first place. Many (most?) systems
do not have C++11. This also causes issues when chain-building c-ares,
the hosting system needs to be updated to support passing this
additional flag if necessary, it doesn't seem reasonable to add this
requirement which breaks compatibility.
This change auto-detects if the system can build the tests and
automatically disable them if it cannot. If you pass --enable-tests to
configure and the system cannot build them either due to lack of system
support, or because cross-compilation is being used, it will throw an
appropriate error since the user indicated they really did want the
tests.
David Drysdale (3 Mar 2016)
- [Viktor Szakats brought this change]
Makefile.m32: add support for CROSSPREFIX
- [Viktor Szakats brought this change]
Makefile.m32: add support for extra flags
Allow specification of CARES_{LD,C}FLAG_EXTRAS envvars
for mingw
- test: Build with MinGW on AppVeyor
- test: avoid in6addr_* constants
These aren't available on MinGW, so use explicit addresses instead.
- test: add missing #includes for dns-proto.cc
- [Gregor Jasny brought this change]
Fix man page typos detected by Lintian
Daniel Stenberg (19 Feb 2016)
- configure: acknowledge --disable-tests
Fixes #44
- AUTHORS: added contributors from the 1.11.0 release
- bump: start working on the next version
Version 1.11.0 (19 Feb 2016)
Daniel Stenberg (19 Feb 2016)
- RELEASE-NOTES: final edits for 1.11.0
David Drysdale (15 Feb 2016)
- ares_dup.3: remove mention of nonexistent function
ares_dup_options() doesn't exist, so don't document it.
- test: skip repeated build steps
Top-level buildconf/configure now triggers for the
test/ subdir too, so don't need to do explicitly.
- test: namespaces unavailable when cross-compiling
Daniel Stenberg (13 Feb 2016)
- configure: only run configure in test when NOT cross-compiling
... as the tests won't run cross-compiled anyway
David Drysdale (13 Feb 2016)
- test: prefer ON_CALL to EXPECT_CALL to reduce flakes
For UDP tests, there's a chance of a retry. EXPECT_CALL only
expects a single request to arrive at the server; ON_CALL allows
for a UDP retry and repeats the same answer.
Note that ON_CALL and EXPECT_CALL can't be mixed in the same
test, and that tests that have a varied sequence of responses
for the same repeated request still have to use EXPECT_CALL.
Daniel Stenberg (13 Feb 2016)
- configure: run configure in 'test' too
Having the test dir completely stand-alone causes too many issues for
users and devs. It still needs to be built specifically.
- configure: build silently by default
- buildconf: run test/buildconf too if present
- test/configure: build silently by default
- [Gregor Jasny brought this change]
dist: Distribute README.md
Closes #42
Version 1.11.0 (11 Feb 2016)
Daniel Stenberg (11 Feb 2016)
- Makefile.am: distribute the test dir too
- RELEASE-NOTES: synced with 385582bd14b68a
- [Nicolas \"Pixel\" Noble brought this change]
ares_win32_init: make LoadLibrary work when using UNICODE too
Closes #17
David Drysdale (11 Feb 2016)
- Use "resolve" as synonym of "dns" in nsswitch.conf
Modern Linux systems may have libnss_resolve from systemd as the
resolver, which is then configured in /etc/nsswitch.conf with
the "resolve" keyword rather than "dns".
Fixes #33
- ares_set_socket_callback: make manpage match code
The code in ares_process.c that invokes the socket creation/connection
callback only checks for rc < 0, not for standard ares error codes.
- Merge pull request #36 from AGWA-forks/master
Add ares_set_socket_configure_callback()
- test: Update init tests to match behaviour
Unreadable config files are now treated the same way
as absent config files.
- [Fedor Indutny brought this change]
Ignore `fopen` errors to use default values
After 46bb820be3a83520e70e6c5f0c5133253fcd69cd `init_by_resolv_conf`
errors are no longer swallowed in `ares_init_options`. This has exposed
a previously unknown bug in `lookups` initialization code.
If there is no lookup configuration in `resolv.conf`,
`init_by_resolv_conf` will attempt to read it from other files available
on the system. However, some of these files may have restricted
permissions (like `600`), which will lead to `EACCESS` errno, which in
turn is handled like a fatal error by `init_by_resolv_conf`.
However, it sounds illogical that this error should be handled as a
fatal. There is a `init_by_defaults` call that overrides `lookups` with
default value, and certainly possible absence of lookup information is
the reason why this function exists in a first place!
I suggest handling any `fopen` errors as non-fatal ones, allowing to
pick up the `lookups` value from different config files, or to pick up
default value.
Andrew Ayer (9 Feb 2016)
- Document callback type in man page for ares_set_socket_callback
- Add ares_set_socket_configure_callback()
This function sets a callback that is invoked after the socket is
created, but before the connection is established. This is an ideal
time to customize various socket options.
David Drysdale (9 Feb 2016)
- test: ares_set_socket_callback failure behaviour
- test: Check ares_parse_txt_reply_ext() entrypoint
- [Fedor Indutny brought this change]
txt: introduce `ares_parse_txt_reply_ext`
Introduce `ares_txt_ext` structure with an extra `record_start`
field, which indicates a start of a new TXT record, thus allowing to
differentiate the chunks in the same record, from a chunks in a
different record.
Introduce a new API method: `ares_parse_txt_reply_ext` that works with
this kind of struct.
- doc: Update missed repo references
- doc: Update docs on contributing
- test: Run command line tools in Travis
Do a quick execution of each of the command line tools
in the continuous integration build, so that any (say)
sanitizer failures show up.
- acountry: drop inert test
If ver_1 is true, then z0 and z1 must both be 'z', and so
(z0 != 'z' && z1 != 'z') can never be true.
CID 56879, pointed out by Coverity.
- doc: update badge locations to master repo
- test: Enable maintainer mode + debug in Travis
- test: Add an iOS build target
- test: Ignore SIGPIPE in tests
- test: More initialization tests
- test: Improve containerized test mechanism
Aim is to ensure that code coverage information can escape the
container. To do this:
- Enter a new mount namespace too, so that we can...
- Bind mount the expected source directory into the container
- Share memory with the sub-process so coverage information is
shared too.
- test: Make contained tests easier to write
- test: Add framework for containerized testing
On Linux we can potentially use user and UTS namespaces to run a test
in a pseudo-container with:
- arbitrary filesystem (e.g. /etc/resolv.conf, /etc/nsswitch.conf, /etc/hosts)
- arbitrary hostname/domainname.
Include a first pass at the framework code to allow this, along with a
first test case that uses the container.
- test: Use a longer timeout for less flakiness
Having occasional test failures from timeout before multiple
queries can complete, so up the default timeout for the test
from 100ms to 1500ms.
- test: Make failure tests more robust
Different platforms will do different numbers of allocations
in the processing of a given API call; just check that the
return code is either success or ENOMEM, and free off any
returned state in the former case.
Also cope with ECONNREFUSED as well as ENOTFOUND.
- test: Get test code building under Windows
- Initial nmake file based off library nmake file
- Cast socket call arguments to (char *)
- Use wrapper sclose() that maps to closesocket() or close()
- Build a config.h indicating presence of headers
- Conditionally include netdb.h
- Remove unnecessary include of sys/socket.h
- Force longer bitmask for allocation failure tracking
- Call WSAStartup() / WSACleanup() in main()
- Set TCP_NODELAY for mock server
- Turn on tests in AppVeyor build
- test: Disable tests that manipulate env on Windows
- test: Move file lists into Makefile.inc
In preparation for a Win32 build of the test suite.
- test: Add a simple multi-server test
Check rotate option does something
- test: Allow for multiple mock servers
- Update the MockServer to allow separate specification of
UDP and TCP ports
- Have an array of mock servers listening on consecutive
sets of ports.
- Rename Process(fd) to ProcessFD(fd) to avoid confusion.
- Initialize channel by using the new ares_set_servers_ports()
entrypoint, so multiple ports on the same loopback address
can be used.
- test: Update test for set/get_servers variants
Ports are significant in the _ports_ variant functions, so update test to cope.
- test: Make GetNameServers() utility function port-aware
Also make it generally available.
- test: more testing, including of internal static functions
- test: more tests, especially fallback processing
- Make mock server listen on UDP + TCP in parallel.
- Test UDP->TCP fallback on truncation
- Test EDNS->no-EDNS fallback
- Test some environment init options
- Test nonsense reply
test: short response
- test: more tests, particularly of initialization
- test: Run mock tests over both TCP and UDP
With the exception of a few tests that make use of the timed
retry aspect of UDP.
- test: Run mock tests over both IPv4 and IPv6
- test: Add more tests for edge cases
- test: more nooks and crannies of pton functions
- test: More tests for PTR parsing
- test: Use of HOSTALIAS environment variable
- test: Add RAII utility classes for testing
- TempFile holds specific contents
- EnvValue sets an environment variable
- test: More search domain scenarios
- test: Remove duplicate flags from Makefile.am
- test: Make test code leak-free
- test: More tests
- test use of sortlist
- test gethostbyname(AF_UNSPEC)
- test: Test ares_gethostbyname_file()
- test: Add more tests of ares_getnameinfo()
- test: Tweak tests, add alloc failure test
- test: Test init with options
- test: More tests
- ares_inet_net_pton() variants
- ares_getsock() variants
- test: Expose ProcessWork() function
- test: More parsing tests
Including:
- Split each parse function test set out into separate files.
- Add an allocation failure test for each parsing function.
- Add error check test for each parsing function.
- test: Add various additional tests
- test: More tests
Include tests of internal functions, based on the value of the
CARES_SYMBOL_HIDING macro; need to configure the library with
--disable-symbol-hiding to enable these tests.
- test: Allow command line override of mock server port
- test: Add README.md documentation
- test: Temporarily avoid latest Python requests package
Currently get error from Travis on this install step, and downgrading one
version appears to fix the problem.
"Could not find any downloads that satisfy the requirement pyOpenSSL>=0.13
(from requests[security])"
- test: Add AppVeyor config file for Windows build
- test: Add configuration for a Travis build
Cover Linux & OSX on the container infrastructure, but install
a later G++ to satisfy the tests' need for C++11.
Use a build matrix to include a variety of build variants:
- ASAN
- UBSAN
- LSAN
- Coverage via coveralls.io
test: invoke ASAN and coverage in Travis build
Also shift to use explicit build matrix
test: Use coveralls.io for coverage tracking
test: Add a build with UBSAN
Also expand and re-order the setting of environment variables
for easier modification.
test: Add LSAN build to Travis config
- test: Add initial unit tests for c-ares library
The tests are written in C++11, using the GoogleTest and GoogleMock
frameworks. They have their own independent autoconf setup, so that
users of the library need not have a C++ compiler just to get c-ares
working (however, the test/configure.ac file does assume the use of
a shared top-level m4/ directory). However, this autoconf setup has
only been tested on Linux and OSX so far.
Run with "./arestest", or "./arestest -v" to see extra debug info.
The GoogleTest options for running specific tests are also
available (e.g. "./arestest --gtest_filter=*Live*").
The tests are nowhere near complete yet (currently hitting around
60% coverage as reported by gcov), but they do include examples
of a few different styles of testing:
- There are live tests (ares-test-live.cc), which assume that the
current machine has a valid DNS setup and connection to the
internet; these tests issue queries for real domains but don't
particularly check what gets returned. The tests will fail on
an offline machine.
- There a few mock tests (ares-test-mock.cc) that set up a fake DNS
server and inject its port into the c-ares library configuration.
These tests allow specific response messages to be crafted and
injected, and so are likely to be used for many more tests in
future.
- To make this generation/injection easier, the dns-proto.h file
includes C++ helper classes for building DNS packets.
- Other library entrypoints that don't require network activity
(e.g. ares_parse_*_reply) are tested directly.
- There are few tests of library-internal functions that are not
normally visible to API users (in ares-test-internal.cc).
- A couple of the tests use a helper method of the test fixture to
inject memory allocation failures, using the earlier change to the
library to allow override of malloc/realloc/free.
- There is also an entrypoint to allow Clang's libfuzzer to drive
the packet parsing code in ares_parse_*_reply, together with a
standalone wrapper for it (./aresfuzz) to allow use of afl-fuzz
for further fuzz testing.
- test: Add local copy of GoogleMock/GoogleTest 1.7.0
Don't check in gtest/m4 files, as they are unused and interfere
with the top-level configure process.
- doc: Show build badges in README.md
Note that these URLs will need to be updated if/when the test branch
gets pulled into the master repo/branch.
- doc: Convert README to README.md
Gives better display on GitHub
- doc: Update in preparation for next release
Assume 1.11.0 is next (as there are various API additions).
Also add myself to AUTHORS.
- build: Allow header compilation by Windows C++ compiler
- build: Expose whether symbol hiding is on
Adding the CARES_SYMBOL_HIDING definition allows the test suite to
detect whether internal symbols are available or not.
- build: Add autoconf macros for C++11 code using pthreads
Pull in testing macros from the GNU autoconf archive to allow
configure scripts to test for and setup use of a C++11 compiler
(AX_CXX_COMPILE_STDCXX_11) and the pthreads library (AX_PTHREAD).
Note that these macros are not used by the main library autoconf,
just by the tests (which share the same m4/ directory).
- build: Add a code coverage option
Configure with:
./configure --enable-code-coverage
Show coverage output with:
make code-coverage-capture
Built on m4/ax_code_coverage.m4 from the GNU autoconf archive
to provide the macros to check for presence of gcov + lcov;
upstream macro modified to:
- Remove use of $(AM_DEFAULT_VERBOSITY) , as earlier versions of
autoconf (such as the one used by default on Travis) do not have this.
- Rather than automatically defining CODE_COVERAGE_RULES to be a set
of makefile rules that use ifeq/endif (which is GNU make-specific),
instead only define CODE_COVERAGE_RULES if coverages is turned on,
and in that case don't use conditionals in the makefile.
- api: Add entrypoints to allow use of per-server ports
Add user-visible entrypoints ares_{get,set}_servers_ports(3), which
take struct ares_addr_port_node rather than struct ares_addr_node.
This structure includes a UDP and TCP port number; if this is set
to zero, the channel-wide port values are used as before.
Similarly, add a new ares_set_servers_ports_csv(3) entrypoint, which
is analogous to ares_set_servers(3) except it doesn't ignore any
specified port information; instead, any per-server specified port
is used as both the UDP and TCP port for that server.
The internal struct ares_addr is extended to hold the UDP/TCP ports,
stored in network order, with the convention that a value of zero
indicates that the channel-wide UDP/TCP port should be used.
For the internal implementation of ares_dup(3), shift to use the
_ports() version of the get/set functions, so port information is
transferred correctly to the new channel.
Update manpages, and add missing ares_set_servers_csv to the lists
while we're at it
- api: Add ares_set_sortlist(3) entrypoint
Allow explicit configuration of the channel's sortlist, by
specifying a string in the same format as the equivalent
/etc/resolv.conf option.
This allows library users to perform the same configuration
that is available via /etc/resolv.conf, but without needing
to change that file.
- api: Allow injection of user-specified malloc/free functions
Add a new ares_library_init_mem() initialization function for the
library which allows the library user to specify their own malloc,
realloc & free equivalents for use library-wide.
Store these function pointers in library-wide global variables,
defaulting to libc's malloc(), realloc() and free().
Change all calls to malloc, realloc and free to use the function pointer
instead. Also ensure that ares_strdup() is always available
(even if the local environment includes strdup(3)), and change the
library code to always use it.
Convert calls to calloc() to use ares_malloc() + memset
- api: Add option to expose some internal functions
Purely for testing, add --enable-expose-statics option to configure
which converts some static internal functions to be externally visible.
- api: Expose the ares_library_initialized() function
- ahost: Allow repeated -s <domain> options
This also removes a potential leak where later -s options would
replace earlier ones without freeing the relevant string.
- Mark unhittable lines
Add comments for the benefit of the lcov tool, marking
lines that cannot be hit. Typically these are fall-back
protection arms that are already covered by earlier checks,
and so it's not worth taking out the unhittable code (in case
someone changes the code between the two places in future).
- ares_set_servers_csv.3: make return type match code
- bitncmp: update comment to match code behaviour
- ares_striendstr: fix so non-NULL return can happen
This looks to have been broken since it was first introduced in 2005 in
commit aba0b775ea30 ("Added ares_getnameinfo which mimics the
getnameinfo API")
- config_sortlist: free any existing sortlist on (re)alloc failure
If we get an allocation failure on 2nd or later entry in the sortlist, the
code would return ENOMEM but still leave the initial entries allocated.
Ensure that *sortlist is set to NULL whenever ENOMEM is returned.
- ares_dup: clear new channel on failure
If the attempt to transfer IPv6 servers from the old to the new channel
fails, the previous code would still return a channel to the user even though
an error return code was generated. This makes it likely that users would
leak the channel, so explicitly clear the channel in this case.
- ares_init_options: don't lose init failure
If (say) init_by_options() fails, the subsequent call to
init_by_defaults() was overwriting the return code with
success. Still call init_by_defaults() regardless, but track
its return value separately
- ares_gethostbyname: don't leak valid-but-empty hostent
If an AF_UNSPEC query gets a valid response to its AAAA query,
but which has no IPv6 addresses in it, then the code chains on to
a A record query. However, the hostent from the AAAA response
was being leaked along the way (because it gets replaced before
the follow-on end_hquery() invocation).
- ares_parse_txt_reply: propagate errors from per-substring loop
If we get an allocation failure when processing a particular substring in a
TXT record, that failure is silently lost; fix that by propagating errors from
the inner loop to the outer loop.
- process_answer: fix things up correctly when removing EDNS option
When a server rejects an EDNS-equipped request, we retry without
the EDNS option. However, in TCP mode, the 2-byte length prefix was
being calculated wrong -- it was built from the answer length rather than
the length of the original request.
Also, it is theoretically possible that the call to realloc() might change
the data pointed to; to allow for this, qbuf also needs updating.
(Both these fixes were actually included in a patchset sent on the mailing
list in Oct 2012, but were included with other functional changes that
didn't get merged:
http://c-ares.haxx.se/mail/c-ares-archive-2012-10/0004.shtml)
- ares__read_line: clear buf pointer on realloc failure
- ares_expand_name: check for valid bits in label length
The top two bits of the label length indicate whether this is a
label length (00) or an index to a name elsewhere in the message
(11). RFC1035 4.1.4 says that the other possible values for the
top two bits (01, 10) are reserved for future use.
Daniel Stenberg (23 Jan 2016)
- [Gregor Jasny brought this change]
Fix typos detected by lintian
Closes #32
- [Gregor Jasny brought this change]
Distribute all man pages
- README.cares: s/I/Daniel
... and add a pointer to an existing version of the original area 1.1.1
package.a
- read_tcp_data: don't try to use NULL pointer after malloc failure
CID 56884, pointed out by Coverity. We really should make this function
return an error code so that a malloc() failure can return back a major
failure.
- configure_socket: explicitly ignore return code
CID 56889 in Coverity pointed out the return code from setsocknonblock()
is ignored, and this added typecast to (void) makes it explicit.
- ahost: check the select() return code
Fixes CID 137189, pointed out by Coverity
David Drysdale (18 Jan 2016)
- Fix buildconf on platforms using glibtoolize
Commit c49a87eea538 changed buildconf to only check for
libtoolize, but missed a line
- Don't exit loop early leaving uninitialized entries
Update for commit affc63cba875d.
The original patch from Gregor Jasny did not have the break
statement; I incorrectly added it to prevent continuing the loop.
However, the later entries in the array would then be left
uninitialized, causing problems for later cleanup.
So fix to match Gregor's original patch, with apologies.
Daniel Stenberg (18 Jan 2016)
- buildconf: remove check for libtool, it only requires libtoolize
David Drysdale (17 Jan 2016)
- [Gregor Jasny brought this change]
Use libresolv to initialize cares on iPhone targets
On iPhone targets like iOS, watchOS or tvOS the file
/etc/resolv.conf cannot be used to configure cares.
Instead the resolver library is queried for configuration
values.
CC: Yury Kirpichev <ykirpichev@yandex-team.ru>
Daniel Stenberg (17 Jan 2016)
- README: updated to new repo URL
David Drysdale (14 Jan 2016)
- [Lei Shi brought this change]
Fixing slow DNS lookup issue
This patch is fixing the dns lookup issue due to dummy dns information
of a disconnected adapter(in my case is a bluetooth adapter). I changed
the dns lookup policy to try GetNetworkParams first because the
GetNetworkParams provides the most reliable dns information (lots of
checks were done by system). I also filter out inoperable adapter in
DNS_AdaptersAddresses in case GetNetworkParams fail.
- Merge pull request #30 from p-push/vs-2015
Support Visual Studio 2015
Oleg Pudeyev (3 Jan 2016)
- [Gisle Vanem brought this change]
Support Visual Studio 2015
David Drysdale (11 Nov 2015)
- [Andrew Andkjar brought this change]
added another version case to Makefile.msvc
nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110
- Merge pull request #26 from bitbouncer/vs-2013
added define for visual studio 2013
svante karlsson (25 Jun 2015)
- added define for visual studio 2013
Jakub Hrozek (6 Nov 2014)
- ares__read_line: free buf on realloc failure
- Destroy options if ares_save_options fails
It's possible that, if ares_save_options failed, the opts structure
would contain some allocated memory. Calling ares_destroy_options in
this case is safe, because ares_save_options zeroes out the memory
initially.
- [David Drysdale brought this change]
Continue loop if space for hostname not large enough
When attempting to build a search domain from the local hostname
(used as a fallback when no other methods have given a search
domain), the code doubles the buffer size on each loop iteration.
However, the loop previously had a WHILE_FALSE terminator so the continue
statement exited the loop rather than going round again.
Daniel Stenberg (30 Oct 2014)
- ares_getnameinfo.3: there is no ares_getaddrinfo
David Drysdale (30 Sep 2014)
- [Gregor Jasny brought this change]
Prevent tmpbuf from overrunning
Fix Coverity error CID 56886.
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
- [Gregor Jasny brought this change]
Re-start loop if select fails
Fix Coverity error CID 56882
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
- [Gregor Jasny brought this change]
Free temporary variable in error path
Fix Coverity CID 56890
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
- [Gregor Jasny brought this change]
Fix integer shift overflow if both tcp_socket and udp_socket are set
The problem occurs if at the start of the loop the sockindex is at the
last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and
tcp_socket are valid, sockindex gets incremented for UDP first and
points one entry behind the array for the tcp block.
So the fix is to check after every increment of sockindex if it is still
valid.
Fix Coverity error CID 56878
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
- [Gregor Jasny brought this change]
Null check before dereference
Fix Coverity error CID 56880
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Jakub Hrozek (28 Jul 2014)
- [Gisle Vanem brought this change]
Comment in ares_ipv6.h
David Drysdale (25 Jul 2014)
- CONTRIBUTING: add file to indicate mailing list is preferred
- Add -t u option to ahost
Add an option to allow specification of the AF_UNSPEC
address family.
Jakub Hrozek (24 Jul 2014)
- host_callback: Fall back to AF_INET on searching with AF_UNSPEC
Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the
first AF_INET6 call only returned CNAMEs, the host_callback never
retried AF_INET.
This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is
taken as authoritative only if the result contains some addresses.
- [David Drysdale brought this change]
Move memset call below platform-specific declarations
A GitHub commenter [1] says that my recent change to ahost.c has
problems compiling on Windows + C89 platforms.
[1] https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616
- [David Drysdale brought this change]
Update ahost man page to describe -s option.
Commit ee22246507c9 added the -s <domain> option to the
ahost command, but neglected to update the man page to
describe it.
Also fix typo in description of -t option.
- ares_parse_soa_reply: Do not leak rr_name on allocation failure
If ares_malloc_data failed, already allocated rr_name would go out of
scope.
- [David Drysdale brought this change]
Don't override explicitly specified search domains
Only set search domains from /etc/resolv.conf if there isn't a value
already present in the channel.
- [David Drysdale brought this change]
Allow specification of search domain in ahost
Add the "-s domain" command line option to override the search
domains.
Daniel Stenberg (12 May 2014)
- Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address"
This reverts commit 440110b303fdbfadb3ad53d30eeb98cc45d70451.
- [Frederic Germain brought this change]
ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address
- [Doug Kwan brought this change]
ares_build.h: fix building on 64-bit powerpc
There are two issues.
1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and
__PPC64__. The tests of __ILP32__ and __LP64__ are sufficient for gcc.
2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when
targeting ppc64. This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system
when building with clang.
My patch is two change the order of the checks so that we check the
64-bit case first.
- refresh: updated now with automake 1.14
- [David Drysdale brought this change]
single_domain: Invalid memory access for empty string input
We noticed a small buglet in ares_search() when it gets an empty string
as input -- the single_domain() utility function in ares_search.c
accesses invalid memory (before the start of the string).
Guenter Knauf (31 Aug 2013)
- Fixed warning 'type specifier missing'.
Daniel Stenberg (30 Aug 2013)
- [Tor Arntsen brought this change]
ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it
It was removed in f19387dd72432
- nowarn: use <limits.h> instead of configure for size of long
This makes the header file much more multi-arch friendly and can be used
as-is with both 32 bit and 64 bit builds.
- timeoffset: made static and private
ares__timeoffset() was only used once within this single source file
- timeadd: make static
ares__timeadd() was only ever used from within the same source
Yang Tse (18 Jul 2013)
- xc-am-iface.m4: comments refinement
- configure: fix 'subdir-objects' distclean related issue
See XC_AMEND_DISTCLEAN comments for details.
- configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE)
- xc-am-iface.m4: provide XC_AUTOMAKE macro
Daniel Stenberg (12 May 2013)
- gitignore: ignore all ares_*pdf but also CHANGES.dist
- bump: start working towards 1.10.1
Version 1.10.0 (12 May 2013)
Daniel Stenberg (12 May 2013)
- RELEASE-NOTES: two more bug fixes
- [Keith Shaw brought this change]
ares_set_servers_csv: fixed IPv6 address parsing
Fixed bug that caused the last part of an IPv6 address to be parsed as
the port number when the last part is all numeric.
- nroff: fix two syntax mistakes
ares_parse_a_reply and ares_parse_aaaa_reply both had two \fB instead of
\fP
Reported-by: Alexander Klauer
Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-03/0010.shtml
- [Alex Loukissas brought this change]
build: fix build on msvc11
- Makefile.am: increment -version-info for 1.10.0 release
- README: remove unnecessary comment
- ares_version.h: copyright end range year is now 2013
- RELEASE-NOTES: synced with fb0737f3a0a1c37
- [Paul Saab brought this change]
ares_parse_aaaa_reply: Plug memory leak
This change is similar to ares_parse_a_reply.c in commit
bffd67f16a8f42fe6dbf79ab2e39d92eea05c8a6
- [Patrick Valsecchi brought this change]
ares_parse_txt_reply: return a ares_txt_reply node for each sub-string
Previously, the function would wrongly return all substrings merged into
one.
- [Alexander Klauer brought this change]
library init: documentation update
This commit updates the documentation of ares_library_init() and
ares_library_cleanup() with regard to the newly introduced reference
counting of initializations and deinitializations.
- [Alexander Klauer brought this change]
library init: be recursive
Previously, a single call to ares_library_cleanup() would deinitialise
the c-ares library, regardless of how many times ares_library_init() was
called. This behaviour may cause problems in programs linking two or
more libraries which, in turn, use c-ares. The present commit fixes this
problem, deinitializing the library only after a number of calls to
ares_library_cleanup() matching the number of calls to
ares_library_init().
- [Patrick Valsecchi brought this change]
protocol parsing: check input data stricter
... so that bad length fields aren't blindly accepted
Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-04/0016.shtml
Guenter Knauf (11 Apr 2013)
- Create ares_build.h when buidling from Git.
- Added -DCARES_STATICLIB to CFLAGS.
Currently this static makefile does only support building the
static library libcares.a.
Daniel Stenberg (8 Apr 2013)
- [Alexander Klauer brought this change]
.gitignore: ignore patch files
This commit adds a line to .gitignore to the effect that patch files
generated by 'git format-patch' are excluded from the repository.
- [Alexander Klauer brought this change]
ares_destroy() documentation: no new requests
Clarify that no new requests may be added to a resolver channel that is
currently being destroyed.
- [Alexander Klauer brought this change]
Documentation: properly document ARES_ECANCELLED
This commit clarifies the behaviour of ares_cancel() with respect to
callbacks and adds missing documentation of ARES_ECANCELLED to the man
pages of the affected functions.
- [Alexander Klauer brought this change]
ares_cancel(): cancel requests safely
An invocation of ares_cancel() walks through the request list, calling
the callbacks of all pending requests on a channel. Previously, if such
a callback added a new request to the channel, the request list might
not end up empty, causing an abort by assertion failure. The present
commit ensures that precisely all requests present upon entry of
ares_cancel() are cancelled, and that adding new requests through
callbacks is safe.
Yang Tse (10 Mar 2013)
- ares.h: stricter CARES_EXTERN linkage decorations logic
No API change involved.
- ares_build.h.dist: enhance non-configure GCC ABI detection logic
GCC specific adjustments:
- check __ILP32__ before 32 and 64bit processor architectures in
order to detect ILP32 programming model on 64 bit processors
which, of course, also support LP64 programming model, when using
gcc 4.7 or newer.
- keep 32bit processor architecture checks in order to support gcc
versions older than 4.7 which don't define __ILP32__
- check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor
architecture checks for older versions which don't define __LP64__
Daniel Stenberg (9 Mar 2013)
- ares.h: there is no ares_free_soa function
Yang Tse (9 Mar 2013)
- Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility
- ares_inet_ntop.3: s/socklen_t/ares_socklen_t
- configure: use XC_LIBTOOL for portability across libtool versions
- xc-lt-iface.m4: provide XC_LIBTOOL macro
- Makefile.am: use AM_CPPFLAGS instead of INCLUDES
- inet_ntop.c: s/socklen_t/ares_socklen_t
- inet_ntop.c: s/socklen_t/ares_socklen_t for portability
Daniel Stenberg (19 Feb 2013)
- ares.h: s/socklen_t/ares_socklen_t for portability
- ares_inet_ntop.3: 4th argument is socklen_t!
- spell inet correctly!
- ares_inet_pton/ntop: cleanup
Make sure that the symbols are always exported and present in c-ares.
Make the headers prefixed with 'ares'.
Removed the inet_ntop.h version as it no longer features any content.
- ares_inet_ntop/ares_inet_pton: added man pages
Yang Tse (15 Feb 2013)
- [Gisle Vanem brought this change]
curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()
- [Gisle Vanem brought this change]
config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
- [Gisle Vanem brought this change]
config-dos.h: define strerror() to strerror_s_() for High-C
Daniel Stenberg (13 Feb 2013)
- ares_get_datatype: removed unused function
it was also wrongly named as internal functions require two underscores
- ares__bitncmp: use two underscores for private functions
It used a single one previously making it look like a public one
- ares__generate_new_id: moved to ares_query.c
... and ares__rc4 is turned into a local static function.
- ares__swap_lists: make private and static
... since there's only one user, make it static within ares_process.c
Yang Tse (13 Feb 2013)
- Makefile.msvc: add four VS version strings
Daniel Stenberg (13 Feb 2013)
- ares_expand_name.3: clarify how to free the data
Yang Tse (30 Jan 2013)
- zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2
- Fix a pair of single quotes to double quotes.
URL: http://curl.haxx.se/mail/lib-2013-01/0355.html
Reported by: Tor Arntsen
- zz40-xc-ovr.m4: fix 'wc' detection - follow-up
- Take into account that 'wc' may return leading spaces and/or tabs.
- Set initial IFS to space, tab and newline.
- zz40-xc-ovr.m4: fix 'wc' detection
- Take into account that 'wc' may return leading spaces.
- Set internationalization behavior variables.
Tor Arntsen analyzed and reported the issue.
URL: http://curl.haxx.se/mail/lib-2013-01/0351.html
- zz40-xc-ovr.m4: check another three basic utilities
- zz40-xc-ovr.m4: 1.0 interface stabilization
- Stabilization results in 4 public interface m4 macros:
XC_CONFIGURE_PREAMBLE
XC_CONFIGURE_PREAMBLE_VER_MAJOR
XC_CONFIGURE_PREAMBLE_VER_MINOR
XC_CHECK_PATH_SEPARATOR
- Avoid one level of internal indirection
- Update comments
- Drop XC_OVR_ZZ40 macro
- zz40-xc-ovr.m4: emit witness message in configure BODY
This avoids witness message in output when running configure --help,
while sending the message to config.log for other configure runs.
- zz40-xc-ovr.m4: truly do version conditional overriding
- version conditional overriding
- catch unexpanded XC macros
- fix double words in comments
- zz40-xc-ovr.m4: fix variable assignment of subshell output bashism
Tor Arntsen analyzed and reported the issue.
URL: http://curl.haxx.se/mail/lib-2013-01/0306.html
- zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
- zz40-xc-ovr.m4: avoid double single-quote usage
- zz40-xc-ovr.m4: parentheses balancing of 'case' statements
m4 quadrigraph shell comment technique allows proper autoconf
parentheses balancing in shell 'case' statements. The presence
of unbalanced parentheses may otherwise trigger expansion bugs.
- zz40-xc-ovr.m4: internals overhauling
- Update comments
- Execute commands in subshells
- Faster path separator check
- Fix missing 'test' command
- Rename private macros
- Minimize AC_REQUIRE usage
- zz40-xc-ovr.m4: redirect errors and warnings to stderr
- configure: use XC_CONFIGURE_PREAMBLE early checks
Some basic checks we make were placed early enough in generated
configure script when using autoconf 2.5X versions. Newer autoconf
versions expand these checks much further into the configure script,
rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement
of early intended checks across all our autoconf supported versions.
- zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro
- configure: autotools compatibility fixes - step I
Fix proper macro expansion order across autotools versions for
C compiler and preprocessor program checks.
- configure: fix automake 1.13 compatibility
Tested with:
buildconf: autoconf version 2.69
buildconf: autom4te version 2.69
buildconf: autoheader version 2.69
buildconf: automake version 1.13.1
buildconf: aclocal version 1.13.1
buildconf: libtool version 2.4
buildconf: GNU m4 version 1.4.16
- ares_private.h: use again memdebug.h instead of curl_memdebug.h
- configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS
automake 1.13 errors if AM_CONFIG_HEADER is used in configure script.
- cares-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally
Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using
an autoconf version that does not provide it, instead of what we were
doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for
all autoconf versions.
- ares_private.h: use curl_memdebug.h instead of memdebug.h
- vc6cares.dsp: add ares_create_query.c and ares_parse_soa_reply.c
- cares-functions.m4: improve gethostname arg 2 data type check
- setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
Also reverts commit bceb40095a
- configure: check if compiler halts on function prototype mismatch
- cares-functions.m4: add gethostname arg 2 data type check and definition
- cares-functions.m4: update thread-safeness detection of getaddrinfo()
Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also
consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or
(_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not.
Take in account that h_errno might be a modifiable lvalue not defined as
a C preprocessor macro.
- setup_once.h: HP-UX <sys/socket.h> issue workaround
Issue: When building a 32bit target with large file support HP-UX
<sys/socket.h> header file may simultaneously provide two different
sets of declarations for sendfile and sendpath functions, one with
static and another with external linkage. Given that we do not use
mentioned functions we really don't care which linkage is the
appropriate one, but on the other hand, the double declaration emmits
warnings when using the HP-UX compiler and errors when using modern
gcc versions resulting in fatal compilation errors.
Mentioned issue is now fixed as long as we don't use sendfile nor
sendpath functions.
- setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
Inclusion of these two header files now done in setup_once.h
- Header inclusion clean-up
Remove header inclusions already done in setup_once.h
- setup_once.h: HP-UX specific TRUE and FALSE definitions
Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.
- ares_timeout.c: fix compiler warning
- ares_create_query.c: IRIX compilation fix
- c-ares/nameser.h: add some T_* defines for ns_t_* values
Daniel Stenberg (7 Nov 2012)
- Revert "ares_parse_aaaa_reply: fix memory leak"
This reverts commit 50f25d8a4b2d16f4c5e0ef620238688b7a315c7a.
- ares_parse_aaaa_reply: fix memory leak
an allocated buffer was not freed in the successful case.
- [Gisle Vanem brought this change]
adig: perror() doesn't work for socket errors on windows
... so print the SOCKERRNO instead
- get_DNS_AdaptersAddresses: fix IPv6 parsing
Use of the wrong define made the function not parse IPv6 addresses
properly.
Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-06/0028.shtml
Reported by: Saúl Ibarra Corretgé
- version: bumped to 1.10.0
Due to the newly added function: ares_create_query()
- AUTHORS: synced with 83093ac450
Added 21 authors since this document was last updated
- ares_create_query.3: mention when this is added
- [hpopescu@ixiacom.com brought this change]
Added new feature (rfc2671)
- code police: fix indents, < 80 columns, reflowed comments
Guenter Knauf (11 Jul 2012)
- Cleaned up version awk script.
Daniel Stenberg (30 Jun 2012)
- [Gisle Vanem brought this change]
read_udp_packets: bail out loop on bad sockets
I can see that recvfrom() in ares_process.c many times is called with
'udp_socket' == ARES_SOCKET_BAD. The code takes care not to call
recv/recvfrom with ARES_SOCKET_BAD in the outer-loop. So should the
inner-loop.
Yang Tse (29 Jun 2012)
- cares-compilers.m4: remove -Wstrict-aliasing=3 from clang
Currently it is unknown if there is any version of clang that
actually supports -Wstrict-aliasing. What is known is that there
are several that don't support it.
- cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds
Daniel Stenberg (18 Jun 2012)
- version: work towards 1.9.2 (at least)
Version 1.9.1 (18 Jun 2012)
Daniel Stenberg (18 Jun 2012)
- RELEASE-NOTES: 1.9.1 coming up
Version 1.9.0 (16 Jun 2012)
Daniel Stenberg (16 Jun 2012)
- ares_version.h: next version is 1.9.0
- [Marko Kreen brought this change]
ares_data.h: ARES_DATATYPE_SOA_REPLY is added in 1.9.0
- RELEASE-NOTES: synced with 979bf951d
Next release deemed to become 1.9.0 due to the new function
- [Marko Kreen brought this change]
SOA parser added
I need to do SOA queries, so here is a parser for them.
- ares_soa_reply: new struct
- ares_malloc_data/ares_free_soa: ARES_DATATYPE_SOA_REPLY
- ares_parse_soa_reply: actual function
Yang Tse (14 Jun 2012)
- Kill compiler warning
- Fix libcares.pc generation for static MingW* cross builds
Daniel Stenberg (21 May 2012)
- [Nick Alcock brought this change]
Fix UDP and TCP port byte order in saved options.
The UDP and TCP port are stored in network byte order in the
ares_channeldata, but are passed in to ares_init_options() in host byte
order. Thus we must return them from ares_save_options() in host byte
order too, or a duplicated channel will convert them again, leading to a
nonfunctional channel and a mysterious connection refused error from
ares_gethostbyname(). This breaks ares_dup(), thus the curl easy API
when c-ares is used by curl, and thus all the curl easy API's users.
Yang Tse (28 Apr 2012)
- version: start working on 1.8.1-DEV
Version 1.8.0 (27 Apr 2012)
Daniel Stenberg (27 Apr 2012)
- RELEASE-NOTES: call next 1.8 instead
Since we added a function, let's use a stricter bumping scheme
Yang Tse (25 Apr 2012)
- INSTALL: some adjustments
Daniel Stenberg (25 Apr 2012)
- GIT-INFO: mention buildconf
Yang Tse (25 Apr 2012)
- INSTALL: remove more sections that don't apply to c-ares
- ares_timeout.c: fix compiler warning
Daniel Stenberg (25 Apr 2012)
- [Ben Noordhuis brought this change]
Makefile.m32: fix mingw32 build
* add . to include path so ares_build.h is picked up
* make ar configurable to ease cross-compiling
- RELEASE-NOTES: added what's happened since 1.7.5
Guenter Knauf (22 Apr 2012)
- Updated copyright year.
Yang Tse (21 Apr 2012)
- ares_init.c: Further refactoring of Windows system's DNS fetching code
Guenter Knauf (20 Apr 2012)
- Android: small changes to dns property part.
Prefix prop vars; kill var; use DNS_PROP_NAME_PREFIX macro.
- Handle CNAME-only in ares_parse_aaaa_reply().
posted to the c-ares list by Peter Griess <pg@std.in>.
- Add support for multiple DNS servers on Android.
Before, c-ares always used the first DNS server on Android, causing
network problems if this DNS server was not available.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
- Added INSTALL so it gets into tarballs.
- Added some more ifdefs to silent compiler warnings.
Yang Tse (17 Apr 2012)
- INSTALL: remove a non c-ares section
- cares-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds
When building a Windows target with gcc 4.5 or newer and strict compiler
warnings enabled use -Wno-pedantic-ms-format in addition to other flags.
- setup_once.h: tighten requirements for stdbool.h header inclusion
Include stdbool.h only when it is available and configure is capable of
detecting a proper 'bool' data type when the header is included.
- configure: NATIVE_WINDOWS no longer defined in config file
- cares-compilers.m4: double underscore decoration for visibility attribute
- build adjustments: CARES_SYMBOL_HIDING no longer defined in config files
configure script now provides conditional definitions for Makefile.am
that result in CARES_SYMBOL_HIDING being defined by resulting makefiles
when appropriate.
- configure: Windows cross-compilation fixes
CARES_BUILDING_LIBRARY and CARES_STATICLIB no longer defined in ares_config.h,
configure will generate appropriate conditionals so that mentioned symbols
get defined and used in Makefile derived from Makefile.am at compilation time.
Guenter Knauf (17 Apr 2012)
- Added INSTALL file adapted from libcurl.
Not yet ready, and needs further edits.
Yang Tse (16 Apr 2012)
- ares_init.c: get_iphlpapi_dns_info() refactoring
Guenter Knauf (16 Apr 2012)
- Kill some more compiler warnings.
- Kill compiler warning about unused var.
- Fixed my last commit: wrong preprocessor directive.
- Check for __ANDROID__ in addition to ANDROID macro.
- Check for __ANDROID__ in addition to ANDROID macro.
Posted to c-ares list by Wayne.
- Fix for Android to disable useless arpa/nameser.h.
- Fix for Android to include sys/select.h for fd_set.
Yang Tse (17 Mar 2012)
- ares_data.c: some NAPTR related fixes
Daniel Stenberg (16 Mar 2012)
- port numbers: convert them to network order!
When the config options ARES_OPT_UDP_PORT or ARES_OPT_TCP_PORT are used,
make sure to convert them to network byte order!
Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-02/0004.shtml
- white space cleanup
- Keep code within 80 columns
- Removed funny spaces after open paren and before closing paren
- [Poul Thomas Lomholt brought this change]
get_iphlpapi_dns_info: fix buffer overrun
I experienced a buffer overrun exception in c-ares on Windows and
tracked it down to be an error in the calculation of the 'left' variable
in get_iphlpapi_dns_info().
I changed the variable type of 'left' to a _signed_ type because of the
subtraction arithmetic; not sure if a long is the best choice
- Merge pull request #7 from saghul/naptr
Added support for parsing NAPTR records
saghul (23 Feb 2012)
- Added support for parsing NAPTR records
Yang Tse (19 Jan 2012)
- ares_init.c: fix compiler warning on winsock builds
- configure: libtool 1.5 tweaks
Daniel Stenberg (19 Dec 2011)
- ares_timeout.3: fix the NAME section
It was clearly a copy n' paste error
Yang Tse (27 Sep 2011)
- [Albert Chin brought this change]
configure - m4: make CURL_CHECK_DEF ignore leading whitespace on symbol def
When using Sun C compiler the preprocessor somehow inserts an extra space
in front of replaced symbol, breaking CURL_CHECK_DEF macro. To workaround
this, macro CURL_CHECK_DEF now ignores all leading whitespace in front of
symbol substitution result.
- ares_init.c: fix segfault triggered in ares_init_options() upon previous
failure of init_by_defaults() and incomplete cleanup there.
- ares_process.c: fix compiler warning
- fix MSVC compiler warning 'conditional expression is constant'
- setup_once.h cleanup and sync
- [Denis Bilenko brought this change]
ares_getnameinfo: fix random results with c-ares 1.7.5
In ares_getnameinfo memcpy did not copy enough bytes, causing
it to return arbitrary memory contents as a result.
- warnings: fix another 'conversion may lose significant bits' compiler warning
- ares_dns.h: adjust DNS__16BIT and DNS__32BIT macro definitions
Fixing compiler warnings existing definitions triggered on these.
- ares_destroy.c: fix segfault in ares_destroy_options()
Daniel Stenberg (21 Aug 2011)
- ares_parse_srv_reply: silence compiler warnings
... by adding ugly typecasts.
- CHANGES: generate from script
The CHANGES file is now generated automatically with 'git2changes.pl',
invoked by the maketgz script which is used to build release archives.
The former human edited CHANGES file was renamed to CHANGES.0 in git.
Yang Tse (21 Aug 2011)
- Makefile.netware: SIZEOF_SHORT definition
- warnings: fix some 'conversion may lose significant bits' compiler warnings
- configure: fix symbol hiding usability check
A more thorough test is done now in order to determine visibility attribute
usability, given that some compilers don't support visibility attribute on
all configurations.
Daniel Stenberg (16 Aug 2011)
- 1.7.6: start working...
Version 1.7.5 (16 Aug 2011)
Daniel Stenberg (16 Aug 2011)
- CHANGES: synced for 1.7.5 release
- RELEASE-NOTES: synced with bb4096effef7f000
Jakub Hrozek (15 Aug 2011)
- Only fall back to AF_INET searches when looking for AF_UNSPEC addresses
Yang Tse (10 Aug 2011)
- [Gisle Vanem brought this change]
ares_iphlpapi.h: Watcom C fix
Added "!defined(_WS2DEF_)" since Watcom doesn't have
a per type guard for the typedefs 'CSADDR_INFO' (that MingW has) or
'SOCKET_ADDRESS' (that MSVC has). But we can use the header-guard for
<ws2def.h> instead.
- [Gisle Vanem brought this change]
Makefile.Watcom:
* The 'NTDDI_VERSION' needs to be raised to 0x05010000
in order for SOCKADDR_STORAGE etc. to be typedefed.
* Replaced '-dUSE_WATT32' with '-dWATT32'.
* Added $(DEMOS) to the 'all' target and removed the 'demos'
target to be consistent with e.g. Makefile.msvc etc.
* 'ENABLE_IPV6' is no longer used. Hence removed the '%use_ipv6' construct.
* object-file order seems to be important (Watcom v.19). Hence
'ares_getopt.obj' must be put after the .obj that references getopt().
- cares-compilers.m4: CARES_CONVERT_INCLUDE_TO_ISYSTEM adjustments
Add CARES_CHECK_COMPILER as a requirement.
Ensure macro does nothing unless GNU_C or CLANG compiler is used.
This should allow usage of this macro in unforeseen placements.
- config-win32.h: comments adjustments - followup
- config-win32.h: comments adjustments
Daniel Stenberg (5 Aug 2011)
- [Tom Hughes brought this change]
ares_parse_a_reply: fix memleak
Yang Tse (29 Jul 2011)
- cares-functions.m4 serial # bump
- Revert "configure: additional flag checks for fcntl() and socket()"
This reverts commit 5f2a3b0e48f26d24cb1fefea0dccb92d417dcbf7.
- configure: additional flag checks for fcntl() and socket()
- xc-translit.m4 fix quoting
- configure: avoid direct usage of AS_TR_* macros
- xc-translit.m4 provides transliteration macros with well defined behavior.
Jakub Hrozek (15 Jun 2011)
- Revert "Only fall back to AF_INET searches when looking for AF_UNSPEC addresses"
This reverts commit b5823d65706af687c0e5110af8f0cfdcd068997d.
This patch was not reviewed properly before pushing
- Revert "Do not use sized constants in public headers"
This reverts commit 22c01e96f7b2ae9923e1baa50bfe3c0d22297a7d.
This is a Red Hat specific patch that does not belong into upstream
- Use correct sizeof in ares_getnameinfo()
- Do not leak rr_name on failures inside ares_parse_ptr_reply
- Do not leak rr_name on failures inside ares_parse_a_reply
- Do not leak rr_name on failures inside ares_parse_aaaa_reply
- Do not leak rr_name on failures inside ares_parse_ns_reply
- Fix incorrect sizeof() in ares_save_options
- Fix incorrect allocation in ares_parse_ptr_reply()
- Only fall back to AF_INET searches when looking for AF_UNSPEC addresses
- Do not use sized constants in public headers
Daniel Stenberg (13 Jun 2011)
- [Jakub Hrozek brought this change]
ares_free_hostent(NULL) should be a noop
Yang Tse (8 Jun 2011)
- configure: fix recvfrom 5th arg type qualifier detection (followup)
- configure: fix recvfrom 5th arg type qualifier detection
Additionally remove whitespace from EOL
Daniel Stenberg (4 Jun 2011)
- strlen: use size_t to receive the return
Yang Tse (4 Jun 2011)
- xlc: avoid preprocessor definition usage when linking
- ares_nowarn: icc 9.1 workaround
- ares_nowarn: header inclusion fix
- ares_init: make ares_private.h last included header again
- compiler warning: fix
Fix compiler warning: conversion may lose significant bits
- compiler warning: fix
Fix compiler warning: variable was set but never used
Fix compiler warning: clobber ignored
- ares_iphlpapi: fix compiler warnings
- winsock: compilation fixes
Provide winsock iphlpapi alternative definitions to prevent compilation
failures when using a variety of winsock header implementations.
Daniel Stenberg (17 May 2011)
- [David Stuart brought this change]
IPv6-on-windows: find DNS servers correctly
- man pages: docs for the c-ares utility programs
- ares_parse_ns_reply.c: remove CVSism
Yang Tse (27 Mar 2011)
- build: fix header inclusion
- getservbyport replacement for Win CE
- renamed getplatform() to ares__getplatform() to avoid namespace pollution
- configure: fix libtool warning
Recent versions of libtool are now tracing usage of AC_CONFIG_MACRO_DIR
macro and warn heavily when not used in configure script along with
ACLOCAL_AMFLAGS in Makefile.am. So in order to make libtool happy
while keeping backwards compatibility this is added.
- adig: RFC4034 resource record type detection
Can be tested with: adig -s 8.8.8.8 -t ANY example.com
- nameser.h: RFC4034 resource record type definitions
- build: move platform stuff to ares_platform.c and ares_platform.h
- build: find out windows platform using GetVersionEx()
- build: use getenv() replacement function for systems which lack it
- setup_once: system error codes for Windows CE
- ares_search: use ERRNO macro for portability sake
- System's errno.h inclusion cleanup follow-up.
System's errno.h is conditionally included from setup_once.h
- Windows CE specific adjustment
All versions of Windows CE support Winsock 1.1
- System's errno.h inclusion cleanup.
System's errno.h is conditionally included from setup_once.h
- ares_init: fix gethostname error detection on winsock platforms
- configure: r-enable temporarily disabled detection of system's inet_ntop()
Detection was temporarily disabled in commit 674e044ccb21f2f63537da53565fce868f
Daniel Stenberg (15 Mar 2011)
- configure: stop using the deprecated AM_INIT_AUTOMAKE syntax
- [Gisle Vanem brought this change]
Watt-32: use errno
Make sure Watt-32 programs use 'errno' even on Win32 targets
Guenter Knauf (18 Feb 2011)
- Removed commented CLFAGS no longer needed.
- Fixed CFLAGS for NetWare.
Added -m32 to enable compilation with x86_64 compilers;
added conditional to set -fpcc-struct-return only for gcc compiler.
Daniel Stenberg (18 Feb 2011)
- [Gisle Vanem brought this change]
Watt32: fix server init
Somewhere in the process, programs using the Watt-32 tcp/ip stack
stopped working.
- [Dima Tisnek brought this change]
config_sortlist: (win32) missing else
Without an else there, contents of "pat" that could have been
successfully set just above, may be clobbered by successive unsuccessful
calls to "xxx_pton" or "ip_addr".
Yang Tse (17 Jan 2011)
- Makefile.msvc: add a couple of VS version strings
- Makefile.msvc: add a couple of VS version strings
- build: add install target to Makefile.msvc
Daniel Stenberg (27 Dec 2010)
- ares_set_servers_csv: remove unused variables
- init_by_resolv_conf: fix compiler warnings
The code received the return codes in the 'status' variable without
using it. Instead we just ignore those particular errors.
- getv4: Value stored to 'dst' is never read
- advance_tcp_send_queue: avoid NULL ptr dereference
If given a too large 'num_bytes' value, it would cause a NULL ptr
dereference. Instead the code will now break out of the loop at the end
of the list.
- [Peter Pentchev brought this change]
configure: fix a bashism
- cleanup: avoid unsafe typecasts
Avoid the risk of reading 16bit data from an unaligned address by using
a macro that is adapted for this.
- [Stefan Bühler brought this change]
ares_expand_name: Fix encoded length for indirect root
Yang Tse (18 Dec 2010)
- build: add some explicit file references to VS project files
- config-win32: provide HAVE_ASSERT_H definition
- build: include ares_nowarn in sample program VS project files
- build: include ares_nowarn among SAMPLESOURCES and SAMPLEHEADERS
- configure: temporarily disable detection of system's inet_ntop()
This is done to allow compilation of ares_inet_ntop() by some daily
builds picky compilers that otherwise do not need this function.
- changes: mention last fix
- ares_inet_ntop: remove definition and usage of macro SPRINTF
Existing definition of SPRINTF always resulted in sprintf() being used,
and sprintf() returning 'int' is already used throughout the library.
- ares_inet_ntop: reapply changes from previous c-ares version (III)
- Replace 'u_char' with 'unsigned char'.
- Replace 'u_int' with 'unsigned int'.
- use macros ERRNO and SET_ERRNO() for errno handling.
- ares_inet_ntop: reapply changes from previous c-ares version (II)
- Remove rcsid.
- Adjust header file inclusions.
- ares_inet_ntop used only on systems without a proper inet_ntop function.
- ares_inet_ntop: reapply changes from previous c-ares version (I)
- Replace tabs with spaces.
- Use ANSI C style for function declarations and definitions.
- Use sizeof with parentheses.
- ares_inet_ntop: fix off by one error triggering out of bounds write
ares_inet_ntop would trigger an out of bounds write when the representation
of the address required 15 characters, due to not taking in account null
termination character.
Full import of inet_ntop.c from bind-9.5.3rc1 to pull additional fixes.
- ares_nowarn: add conditional inclusion of assert.h header
- fix compiler warning: conversion may lose significant bits
- ares_inet_net_pton: fix non-rejection of some malformed literals
ares_inet_net_pton would return wrong values when excessively large,
and invalid, netmasks are used. Fixes are from bind-9.5.3rc1,
issue also described in the WLB-2008080064 advisory.
- setup_once: provide ISASCII macro
- configure: inet_net_pton function check adjustments
Define HAVE_INET_NET_PTON only when system's inet_net_pton function is IPv6
capable and is not affected by the WLB-2008080064 advisory.
HAVE_INET_NET_PTON_IPV6 is no longer defined nor used.
- ares_init: fix detection of semicolon comments in resolv.conf
File resolv.conf may either use a hash '#' or a semicolon ';' character as an
indication that the rest of the line is a comment. This fixes not recognizing
the semicolon as a valid comment indicator in resolv.conf.
- version: start working on 1.7.5
Version 1.7.4 (8 Dec 2010)
Daniel Stenberg (8 Dec 2010)
- release-preps: CHANGES and RELEASE-NOTES synced
- ares_set_local_*: added in 1.7.4, not before
Yang Tse (3 Dec 2010)
- build: provide SIZEOF_SIZE_T definition for non-configure builds
- build: config.dos renamed to config-dos.h
- build: provide SIZEOF_SIZE_T netware definition
- ares_gethostbyaddr: fix compiler warning: conversion may lose significant bits
- configure: undo using autobuilds to temporarily verify strict aliasing warnings.
- fix compiler warning: rounding, sign extension, or loss of accuracy may result
Daniel Stenberg (2 Dec 2010)
- [Ben Noordhuis brought this change]
ares_parse_a_reply: fix CNAME response parsing
Reply to a CNAME query doesn't contain addresses, causing
ares_parse_a_reply() to bail out with ARES_ENODATA
Bug: http://groups.google.com/group/nodejs/browse_thread/thread/a1268c9ea5e9ad9b
Yang Tse (1 Dec 2010)
- fix compiler warning: conversion may lose significant bits
- atoi: remove atoi usage
- ares_init: fix compiler warning: conversion may lose significant bits
- configure: fix autoconf warning
- inet_pton: fix compiler warning
- configure: use autobuilds to temporarily verify strict aliasing warnings.
Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing
rules and warnings. Given that cross-compiled targets autobuilds do not run the
test-suite, there is no risk of running code that violates strict aliasing rules
- ares_getnameinfo: Partially revert commit 85520d66e0ac7ac73411bc25e98769a88b2f
Upon socket address family and length validation failure return ARES_ENOTIMP
in callback again, this is the error code documented in man page and used
mostly all over the library.
- ares_getnameinfo: Validate socket address family and length.
Validate socket address family and that the socket address length is appropriate
for the specified family. Failure is reported with ARES_EBADFAMILY in callback.
- ares_getnameinfo: fix two compiler warnings
- Added another VS10 version string
- Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
- Revert commit 494274e653936335c255a47599970de3df21e7c4
- configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected in body
- Fix compiler warning: array subscript has type 'char'
- Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
- Revert following commits:
07bc7ea79509bcc9ef6e09151e81766ed00d3392
3392a50ea3f8573ea4b7a9d82b9833dab60cb0e9
9912637d32c9987719a1ea12db591aee2941891c
The purpose of the whole patch was to silence a compiler warning triggered
with GCC 4 on file ares_process.c The specific compiler warning was
'dereferencing type-punned pointer might break strict-aliasing rules'.
A simpler patch will follow to equally silence the warning.
- ares_options: reorder header inclusions to make inclusion of
ares_private.h the last included one again.
Daniel Stenberg (12 Nov 2010)
- [Patrik Thunstrom brought this change]
adig: fix NAPTR parsing
I ran across a small "issue" in your adig example.
It is simply the last part of the NAPTR record, the replacement element,
which is not a string, as currently handled in adig, but a domain name.
- ares_save_options: assignments instead of memcpy
- init_by_options: don't copy an empty sortlist
If there aren't any sort items to copy, don't bother. Without this
little precaution it would do a malloc(0) which causes undefined
behaviors and is frowned upon by curl's memdebug-system.
Guenter Knauf (3 Oct 2010)
- Minor Watcom makefile tweaks.
Daniel Stenberg (30 Sep 2010)
- [Mike Crowe brought this change]
Fix lookup with HOSTALIASES set.
ares__read_line returns ARES_EOF when it reaches the end of the
file. This will happen every time when reading to the end of the
HOSTALIASES file. Unfortunately single_domain treats this error as
being fatal.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Ben Greear (24 Aug 2010)
- Add missing break that caused get_ares_servers to fail.
Reported-by: Ning Dong <flintning@163.com>
Signed-off-by: Ben Greear <greearb@candelatech.com>
Yang Tse (11 Aug 2010)
- configure: werror related adjustments
Guenter Knauf (8 Aug 2010)
- Added copyright string to ares_version.h and make use of it in other files.
- Block created ares_build.h for NetWare to avoid usage from other platforms.
- Fix to overwrite default libname.
- Some more Watcom makefile massage ...
- Some more Watcom makefile massage ...
Ben Greear (4 Aug 2010)
- sock-addr-storage: Detect and deal with lack of .ss_family member.
AIX, at least, does not have sockaddr_storage.ss_family member.
Detect this in the configure logic and use proper #ifdefs in the
ares_process logic.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Tor Arntsen <tor@spacetec.no>
Guenter Knauf (3 Aug 2010)
- Added Watcom makefile based on libcurl's Makefile.Watcom.
Ben Greear (31 Jul 2010)
- typo: Fix compile bug for platforms that don't have sockaddr_storage.
Bug was introduced by me in previous commit.
Signed-off-by: Ben Greear <greearb@candelatech.com>
- Fix aliasing warning in gcc 4.4.4 (at least).
Should be no functional change, though the code gets a bit
ugglier.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Daniel Stenberg (31 Jul 2010)
- ares_set_servers_csv: use ISDIGIT
The IS*() set of macros are preferred to the regular is*() functions as
they help us avoid the most common pitfalls.
Ben Greear (30 Jul 2010)
- cast arg to isdigit to int
Looks like it might silence a warning on Netware build.
Signed-off-by: Ben Greear <greearb@candelatech.com>
- remove all uses of uint32_t
Previous fix forgot a few.
Signed-off-by: Ben Greear <greearb@candelatech.com>
- fix signed v/s unsigned casts warning in ares_gethostbyaddr.c
Signed-off-by: Ben Greear <greearb@candelatech.com>
- local-bind-fixup: Fix inet_pton warning.
Conditionally include <arpa/inet.h> for inet_pton
headers.
Signed-off-by: Ben Greear <greearb@candelatech.com>
- build: Enable compiling with -Werror.
This helps find compile warnings because they simply break
the build.
To use:
./configure --enable-warnings --enable-werror
Signed-off-by: Ben Greear <greearb@candelatech.com>
- ipv6: Fix some build issues related to the local-bind feature.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Guenter Knauf (29 Jul 2010)
- Replaced uint32_t with unsigned int to fix broken builds on a couple of platforms.
Daniel Stenberg (18 Jul 2010)
- [Ben Greear brought this change]
local-bind: Support binding to local interface/IPs
Add 3 new functions to set the local binding for the out-going
socket connection, and add ares_set_servers_csv() to set a
list of servers at once as a comma-separated string.
Signed-off-by: Ben Greear <greearb@candelatech.com>
- version: now start on 1.7.4
- [Andrew C. Morrow brought this change]
fix memory leak in ares_getnameinfo
Version 1.7.3 (11 Jun 2010)
Daniel Stenberg (11 Jun 2010)
- changelogs: updated for 1.7.3
- [BogDan Vatra brought this change]
init: allow c-ares to work on Android OS
- changelog: fill in the 1.7.2 changes
- added another pdf to ignore
Yang Tse (11 Jun 2010)
- add ares_parse_mx_reply.c to VS dsp file
Daniel Stenberg (10 Jun 2010)
- tarball: add $(CSOURCES) $(HHEADERS) to EXTRA_DIST
It's not clear to me why we need this, but we apparently may
otherwise not get all files bundled in the dist tarball.
- version: start working on 1.7.3
Version 1.7.2 (10 Jun 2010)
Daniel Stenberg (10 Jun 2010)
- RELEASE-NOTES: 1.7.2 details added
- [Jakub Hrozek brought this change]
ares_init: Last, not first instance of domain or search should win
- style: make code less than 80 columns wide
Yang Tse (31 May 2010)
- [Tor Arntsen brought this change]
improve alternative definition of bool to use enum instead of unsigned char
- fix VS2010 compiler warnings
Daniel Stenberg (18 Apr 2010)
- [Jérémy Lal brought this change]
added ares_parse_mx_reply
- repair the file mode
- remove all $Id$ lines
- remove all .cvsignore files
- spell fix
reported by Gregor Jasny on the mailing list
- [Peter Pentchev brought this change]
Fix a couple of typos and grammar nits.
- ignore the GPG signature files too
- start the journey towards 1.7.2
- no longer CVS tagging
- ignore generated PDFs
Version 1.7.1 (23 Mar 2010)
Daniel Stenberg (23 Mar 2010)
- 1.7.1
- made README the primary readme file
... and did README.cares to contain a historic reason etc.
- s/CVS/git
- git now, not CVS
- ignore lots of generated files
- [Daniel Johnson brought this change]
Fix warnings for clang
Yang Tse (17 Mar 2010)
- replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing
- update outdated serial number
- fix compiler warning
- watt32 compilation fix
- Added another VS10 version string
- fix line break
- removed usage of 's6_addr', fixing compilation issue triggered with no
longer using 'in6_addr' but only our 'ares_in6_addr' struct
Daniel Stenberg (5 Mar 2010)
- Daniel Johnson provided fixes for building with the clang compiler
Yang Tse (5 Mar 2010)
- Added IPv6 name servers support
Gisle Vanem (5 Mar 2010)
- Ops!. Readded ares_nowarn.h.
- Added ares_nowarn.c.
Yang Tse (28 Feb 2010)
- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
- Added ares_nowarn.* to VC6 project file
- Added SIZEOF_INT definition
- fix compiler warning
- fix compiler warning
- fix compiler warning
Daniel Stenberg (17 Feb 2010)
- ares_reinit()
- To allow an app to force a re-read of /etc/resolv.conf etc, pretty much
like the res_init() resolver function offers
- - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
check for broken connections like ares_process() did. Based on that, I
merged the two functions into a single generic one with two front-ends.
Yang Tse (30 Dec 2009)
- VMS specific preprocessor symbol checking adjustments
- Mention last changes
- - Fix configure_socket() to use ares_socket_t instead of int data type.
- - Where run-time error checks enabling compiler option /GZ was used it is now
replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions.
- Compiler option /GX is now replaced with equivalent /EHsc for all versions.
- - Ingmar Runge noticed that Windows config-win32.h configuration file
did not include a definition for HAVE_CLOSESOCKET which resulted in
function close() being inappropriately used to close sockets.
Daniel Stenberg (30 Nov 2009)
- start working on 1.7.1
Version 1.7.0 (27 Nov 2009)
Yang Tse (27 Nov 2009)
- Preserve empty line following last target
- - Larry Lansing fixed ares_parse_srv_reply to properly parse replies
which might contain non-SRV answers, skipping over potential non-SRV
ones such as CNAMEs.
- When using icc, compile with -fpic and link with intel dynamic libraries.
- Added 'currently' in italics to insist on transient situation.
- Fix language
- Daniel wants upcoming release to be 1.7.0
- Mention last changes
- - Removed from external interface preprocessor symbol definition for
CARES_HAVE_ARES_FREE_DATA. Current functionality of ares_free_data()
makes it unnecessary.
- Added README.msvc
- Changed c-ares naming conventions when using MSVC as described in README.msvc
- - Mention other recent changes
- - Jakub Hrozek renamed addrttl and addr6ttl structs to ares_addrttl and
ares_addr6ttl in order to prevent name space pollution, along with
necessary changes to code base and man pages.This change does not break
ABI, there is no need to recompile existing applications. But existing
applications using these structs with the old name will need source code
adjustments when recompiled using c-ares 1.6.1.
- - Jakub Hrozek fixed more function prototypes in man pages to sync them
with the ones declared in ares.h
- Make configure remove the ares_build.h file included in distribution tarballs.
- Fix macro redefinition.
- Fix name space pollution.
- Allow using different extra import libraries for debug and release builds.
- Add manifest stuff to msvc makefile
- Sync man page with reality
- Add missing external API decoration for ares_set_socket_callback()
- Add ares_free_data() man page.
- - Provide in external interface preprocessor symbol definitions for
CARES_HAVE_ARES_FREE_DATA as an indication of function availability.
- Remove typecast
- Fix comment
- Add ares_data.c and ares_data.h
- Jakub Hrozek modified ares_parse_srv_reply() and ares_parse_txt_reply() API
to return a linked lists of results. These were also modified to internally
use the ares_data memory struct and as such its result must be free'ed with
ares_free_data().
- Initial support for the generic ares_free_data() function that will allow
applications to free memory allocated and returned by some c-ares funtions.
- Make usage of calloc()'s arguments consistent with rest of code base
- workaround icc 9.1 optimizer issue
- Add icc fvisibility bug test
- Fix icc 9.0 compiler warning: external definition with no prior declaration
- Fix three var names
- Add check for assert.h header file
- getaddrinfo is fully thread safe on solaris versions which
implement the function even when h_errno is not a macro.
The h_errno macro test now only done on systems for which there
is no hard coded knowledge about getaddrinfo's thread safeness.
- Remove files generated on previous buildconf/configure run
- Remove enable-thread / disable-thread configure option. These were only placebo
options. The library is always built as thread safe as possible on every system.
- Refactor how preprocessor symbol _THREAD_SAFE definition is done.
- Assume that getaddrinfo is thread safe, unless hard coded
knowledge says the contrary or h_errno is not defined.
- Related with the threadsafe capability of getaddrinfo:
- Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2
and newer have a threadsafe getaddrinfo.
- Fix Dragonfly BSD triplet detection.
- In case the hard-coded knowledge says that getaddrinfo is threadsafe,
an additional check is done to verify that h_errno is also defined.
If h_errno isn't defined, we finally assume that it isn't threadsafe.
Jamie Lokier provided the inspiration for this extra check.
- AIX 5.2 and newer have threadsafe getaddrinfo.
Add some comments to better understand what the regex's pretend to achieve.
- HP-UX 11.11 and later have threadsafe getaddrinfo
- Check if getaddrinfo is threadsafe when function check allows it to be used
- Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library
- Add kernel32.lib
- Mention last changes
- Reinstate copyright symbol lost in previous commit
- Make some strings different in resource file for debug or release builds
- Ignore more subdirs
- Fix compiler warning: conditional expression is constant
- Sync linker and resource compiler options with Makefile.msvc
- Follow Makefile.msvc subdirectory naming scheme, and sync compiler options
- Updated MSVC makefile that allows building dynamic and static
c-ares libraries in debug and release flavours.
Additionally each of the three sample programs is built against
each of the four possible c-ares libraries, generating all this
a total number of 12 executables and 4 libraries.
- Test for USE_WINSOCK since it is more restrictive than WIN32
- Make header inclusion depend on HAVE_*_H definition
- Remove unneeded preprocessor directives
- Adjust c-ares include paths for memory tracking enabled (--enable-curldebug) builds
- source files used by sample programs
- Renamed c-ares setup.h to ares_setup.h
- Adjust include paths to take in account that currently:
c-ares with --enable-curldebug uses memdebug.h from libcurl's lib subdirectory.
memdebug.h needs access to libcurl's setup.h from libcurl's lib subdirectory
and also needs access to libcurl's generated curl_config.h
- Undo old temporary change once used for testing purposes
- Mention many changes
- Mention --enable-symbol-hiding configure option
- Symbol hiding configure options renamed to the hopefully less ambiguous
--enable-symbol-hiding and --disable-symbol-hiding as well as related
macro names and some internal variables used for them.
Related configuration file preprocessor symbols named to
CARES_SYMBOL_HIDING and CARES_SYMBOL_SCOPE_EXTERN.
- Header inclusion depending on HAVE_* symbol.
Fix two typos.
- Comparison of the Initial revision of this file with ares_parse_a_reply.c
shows that this one is actually a modified copy of ares_parse_a_reply.c.
In order to comply with ares_parse_a_reply.c's M.I.T. license, the old
1998 M.I.T. copyright notice is now also preserved in this file the same
as it is done in other ares_parse_*.c files.
- Add CVS Id tag.
Fix identation of some license lines.
- Add CVS Id tag.
- Fix comment
- In no particular order, changed/fixed all of the following in
ares_parse_txt_reply() current version:
- Fixed a couple of potential double free's.
- Fixed memory leaks upon out of memory condition.
- Fixed pointer arithmetic.
- Setting ntxtreply to zero upon entry for all failure cases.
- Changed data type to size_t for variables substr_len, str_len and
the length member of ares_txt_reply struct.
- Avoided a couple of memcpy() calls.
- Changed i data type to unsigned int to prevent compiler warnings.
- Adjusted a comment.
- Use ARES_SUCCESS literal for successfull completion.
- Added CVS Id tag.
- Add c-ares DLL resource file to distribution archive
- ignore files
- Empty subdir
- Updated MSVC 6.0 workspace and project files that allows building
dynamic and static c-ares libraries in debug and release flavours.
Additionally each of the three sample programs is built against
each of the four possible c-ares libraries, generating all this
a total number of 12 executables and 4 libraries.
Daniel Stenberg (29 Oct 2009)
- no need to check for NULL pointers before dereferencing, as the pointers
MUST be valid and they are dereferenced further down in the function
unconditionally!
- shorten the descriptions somewhat
- update to the new struct name
- Jakub Hrozek added ares_parse_txt_reply() for TXT parsing
- use 'ares_srv_reply' for proper name-spacing
Yang Tse (29 Oct 2009)
- Add reference for ares_parse_srv_reply.pdf
- Add reference for ares_parse_srv_reply docs
- External API function linkage decoration adjustment
- External API function linkage decoration adjustment
- Initial step towards the ability to reduce c-ares exported symbols
based on the 'visibility' attribute for GNUC and __global for Sun
compilers, taking also in account __declspec function decoration
for Win32 and Symbian DLL's.
Introducing configure options --enable-hidden-symbols and
--disable-hidden-symbols following libcurl's naming.
- Fix comment
- Fix spelling
- Fix Pelles C Win32 target compilation issues
- John Engelhart noticed an unreleased problem relative to a duplicate
ARES_ECANCELLED error code value and missing error code description.
- Fix compiler warning: local variable may be used without having been initialized
- Use *_CHECK_PATH_SEPARATOR_REQUIRED to ensure that *_CHECK_PATH_SEPARATOR
is only expanded and included once in the configure script.
- Our _AS_PATH_SEPARATOR_PREPARE override is now m4_defun'd instead of m4_define'd
due to autoconf 2.64 m4_require'ing it in _AS_SHELL_SANITIZE indirectly through
_AS_PATH_WALK.
- Fix compiler warning: argument is incompatible with corresponding format string conversion
- Fix potential out-of-bounds read
- Fix compiler warning: loop without body
- Fix compiler warning
- Fix compiler warning
- Fix compiler warning
- Fix compiler warning: addition result could be truncated before cast to bigger sized type
- Overhauled ares__get_hostent()
- Fixing out of bounds memory overwrite triggered with malformed /etc/hosts file.
- Improving parsing of /etc/hosts file.
- Validating requested address family.
- Ensuring that failures always return a NULL pointer.
- Adjusting header inclusions.
- Fix ssize_t redefinition errors on WIN64 reported by Alexey Simak
- more files to ignore
- Check if _REENTRANT definition is required to
make errno available as a preprocessor macro.
- Attempt to silence bogus compiler warning: "Potential null pointer dereference"
- ignore more files
Gisle Vanem (7 Sep 2009)
- Suppress warnings about unused prototypes in Watt32 and Win32 programs.
- Update email address.
- Update my email address. Add ares_config.h as dependency for 'make depend'.
Yang Tse (6 Sep 2009)
- T_SRV portability check
Gunter Knauf (5 Sep 2009)
- changed includes to match style how we do with all other *.c files.
- changed u_int16_t to unsigned short because it is the only place within ares and curl where such a type would be used;
also it broke many autobuilds. We should probably introduce an ares_port_t if we want to use a type here.
Gisle Vanem (5 Sep 2009)
- Replace 'uint16_t' with 'u_int16_t' since the latter is used in ares.h.
- Added 'ares_parse_srv_reply.obj'. Added definition of 'u_int16_t'. This is I don't like; we should not depend on such non-universal types in a public header. But this is just a quick fix.
Daniel Stenberg (4 Sep 2009)
- - Jakub Hrozek added ares_parse_srv_reply() for SRV parsing
Steinar H. Gunderson (27 Aug 2009)
- Support lookup of IPv4 literals in ares_gethostbyname(), even when the address family is set to AF_INET6.
Gisle Vanem (3 Aug 2009)
- Remove call to LoadLibrary(). (leftover from debugging).
- Fix bad sentence.
Daniel Stenberg (3 Aug 2009)
- - Timo Teras changed the reason code used in the resolve callback done when
ares_cancel() is used, to be ARES_ECANCELLED instead of ARES_ETIMEOUT to
better allow the callback to know what's happening.
- - Joshua Kwan fixed the init routine to fill in the defaults for stuff that
fails to get inited by other means. This fixes a case of when the c-ares
init fails when internet access is fone.
Gunter Knauf (16 Jul 2009)
- test if adding ../lib to includes can fix the current break ...
- renamed generated config.h to ares_config.h in order to avoid clashes when libcurl is used with other projects which also have a config.h.
Yang Tse (21 Jun 2009)
- Refactor how libraries are checked for connect() function, follow-up.
- Refactor how libraries are checked for connect() function,
and check for connect() as it is done for other functions.
Gisle Vanem (20 Jun 2009)
- Remove unneeded defines.
- Use select_s() and not select().
Yang Tse (19 Jun 2009)
- sclose() function-like macro definition used to close a socket,
now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL
config file preprocessor definitions.
- add CloseSocket camel case function check
- check for socket() and closesocket() as it is done for other functions
- Remove HAVE_CONFIG_H definition from here,
CFLAGS from common.dj already defines it.
- initial step towards decoupling c-ares from libcurl for DOS
- don't ignore these subdirs, they must be removed first
- Remove DEBUGBUILD symbol definition, is not required for programs using the library.
- DEBUGBUILD symbol definition for debug builds
- ignore some subdirs
- fix comment
- Try to make more clear that --enable-curldebug has nothing to do with --enable-debug for this library.
- Revert last change, it is inappropriate.
Gisle Vanem (12 Jun 2009)
- Replace CURLDEBUG with DEBUGBUILD.
Yang Tse (11 Jun 2009)
- when running automake copy missing files instead of symlinking them
- Adjusted to take in account that...
With the curl memory tracking feature decoupled from the debug build feature,
CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows:
CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug)
DEBUGBUILD used for debug enabled specific code (--enable-debug)
- c-ares' --enable-debug --enable-curldebug decoupling follow-up
- mention last changes
- Remove buildconf.bat from release and daily snapshot archives.
buildconf.bat is only for CVS tree builds.
- Ensure that buildconf.bat does nothing unless it is used with a CVS checkout.
- CVS-INFO file only present in CVS tree, never in release nor daily snapshot
archives. Used as a sentinel file in buildconf.bat to differentiate CVS builds.
Gisle Vanem (8 Jun 2009)
- Update comment about "ML". Removed "-D_USE_32BIT_TIME_T" (not a requirement).
Yang Tse (8 Jun 2009)
- just comment it out
- For debugging purposes...
Disable the '-export-symbols-regex' to discard this as the origin
of link failures related with shared libraries and non-GNU linkers.
- c-ares Makefile.am back to using $(top_builddir) for *_LDADD
- c-ares' -no-undefined and --enable-curldebug adjustments
- Use relative path to built c-ares tree libtool library
- John E. Malmberg noticed that the configure script was failing to detect the
timeval struct on VMS when building with _XOPEN_SOURCE_EXTENDED undefined due
to definition taking place in socket.h instead of time.h
- Fix compiler warning: out of bound access
- fix compilation on AIX
- c-ares' --enable-curldebug adjustments
- Remove temporarily introduced memory leak.
- Temporarily introduce a memory leak to verify curl debug memory tracking works.
- Allow curl debug memory tracking when building a shared library on
systems which support external, undefined, symbols in shared libraries.
Daniel Stenberg (26 May 2009)
- language fix
Yang Tse (26 May 2009)
- Make ares_init(), ares_dup() and ares_init_options() return ARES_ENOTINITIALIZED
if library initialization has not been performed calling ares_library_init().
- c-ares's --enable-curldebug configure option decoupled from c-ares's --enable-debug
- Prevent copying 'sourced' manpages for build targets that don't use them.
Daniel Stenberg (23 May 2009)
- minor edits
Yang Tse (21 May 2009)
- Include .pdf versions of c-ares man pages in distribution tarball.
- Allow generation of .html and .pdf versions of c-ares man pages.
Gisle Vanem (21 May 2009)
- $(OBJ_DIR)/ares_getopt.o must be cleaned explicitly.
Yang Tse (20 May 2009)
- Mention last changes
- Initial ares_library_cleanup(3) man page
- Update man page
- Update man page
- Initial ares_library_init(3) man page attempt
- Force revision update, to force CVS to update the $Id date string format
- Add same copyright notice as other c-ares files
- Fix case
- Remove run-time requirement for advapi32.dll since
c-ares can work even with no advapi32.dll at all.
- Intentionally avoid checking if the address of SystemFunction036, a.k.a.
RtlGenRandom, has been located or not. This function is only available on
WinXP and later. When unavailable c-ares uses portable rand() function.
- - Provide in external interface preprocessor symbol definitions for
CARES_HAVE_ARES_LIBRARY_INIT and CARES_HAVE_ARES_LIBRARY_CLEANUP
to ease the use of new capabilities.
- Move ares_version() prototype to ares.h
- Introduction of ares_library_init() and ares_library_cleanup()
- Introduction of ares_library_init() and ares_library_cleanup()
- remove outdated comment
- Fix preprocessor conditional expression
- fiX *__SOCKLEN_T definitions for remaining targets
- *__SOCKLEN_T definitions for OS400 already fixed
- fIX *__SOCKLEN_T definitions for SYMBIAN32 and VMS targets
Daniel Stenberg (11 May 2009)
- - Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to
only expose functions starting with ares_.
Yang Tse (11 May 2009)
- Remove experimental check. Currently there's no need for it.
- Fix an m4 overquoting triggering a spurious 'AS_TR_CPP' symbol definition
attempt in generated config.h
- Proper naming for the experimental compiler test and moved to *-compilers.m4
- Moved *_CHECK_COMPILER_HALT_ON_ERROR and *_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE to *-compilers.m4 along with other *_CHECK_COMPILER_*
- fIX *__SOCKLEN_T definitions for OS400 and generic GCC targets
- fIX *__SOCKLEN_T definitions for MVS and 370 targets
- fIX *__SOCKLEN_T definitions for several Windows target tool-chains
- HP-UX's X/Open network library requirement check follow-up
- HP-UX's X/Open network library requirement check follow-up
- Use build-time configured ares_socklen_t instead of socklen_t
- David McCreedy's "TPF-platform specific changes to various files" patch follow-up
Daniel Stenberg (1 May 2009)
- s/libcurl/c-ares
- version number typo fix
Yang Tse (1 May 2009)
- David McCreedy's "TPF-platform specific changes to various files" patch
|