test_bridges.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. /* Copyright (c) 2018, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file test_bridges.c
  5. * \brief Unittests for code in src/or/bridges.c
  6. **/
  7. #define TOR_BRIDGES_PRIVATE
  8. #define PT_PRIVATE /* Only needed for the mock_* items below */
  9. #include <stdbool.h>
  10. #include "or.h"
  11. #include "address.h"
  12. #include "bridges.h"
  13. #include "config.h"
  14. #include "container.h"
  15. #include "transports.h"
  16. #include "util.h"
  17. /* Test suite stuff */
  18. #include "test.h"
  19. /**
  20. * A mocked transport_t, constructed via mock_transport_get_by_name().
  21. */
  22. static transport_t *mock_transport = NULL;
  23. /**
  24. * Mock transport_get_by_name() to simply return a transport_t for the
  25. * transport name that was input to it.
  26. */
  27. static transport_t *
  28. mock_transport_get_by_name(const char *name)
  29. {
  30. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  31. uint16_t port = 9999;
  32. int socksv = 9;
  33. char *args = tor_strdup("foo=bar");
  34. if (!mock_transport) {
  35. tor_addr_parse(addr, "99.99.99.99");
  36. mock_transport = transport_new(addr, port, name, socksv, args);
  37. }
  38. tor_free(addr);
  39. tor_free(args);
  40. return mock_transport;
  41. }
  42. #undef PT_PRIVATE /* defined(PT_PRIVATE) */
  43. /**
  44. * Test helper: Add a variety of bridges to our global bridgelist.
  45. */
  46. static void
  47. helper_add_bridges_to_bridgelist(void *arg)
  48. {
  49. /* Note: the two bridges which do not have specified fingerprints will be
  50. * internally stored as both having the same fingerprint of all-zero bytes.
  51. */
  52. (void)arg;
  53. char *bridge0 = tor_strdup("6.6.6.6:6666");
  54. char *bridge1 = tor_strdup("6.6.6.7:6667 "
  55. "A10C4F666D27364036B562823E5830BC448E046A");
  56. char *bridge2 = tor_strdup("obfs4 198.245.60.51:443 "
  57. "752CF7825B3B9EA6A98C83AC41F7099D67007EA5 "
  58. "cert=xpmQtKUqQ/6v5X7ijgYE/f03+l2/EuQ1dexjyUhh16wQlu/"
  59. "cpXUGalmhDIlhuiQPNEKmKw iat-mode=0");
  60. char *bridge3 = tor_strdup("banana 5.5.5.5:5555 "
  61. "9D6AE1BD4FDF39721CE908966E79E16F9BFCCF2F");
  62. char *bridge4 = tor_strdup("obfs4 1.2.3.4:1234 "
  63. "foo=abcdefghijklmnopqrstuvwxyz");
  64. char *bridge5 = tor_strdup("apple 4.4.4.4:4444 "
  65. "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA "
  66. "foo=abcdefghijklmnopqrstuvwxyz");
  67. mark_bridge_list();
  68. #define ADD_BRIDGE(bridge) \
  69. bridge_line_t *bridge_line_ ##bridge = parse_bridge_line(bridge); \
  70. if (!bridge_line_ ##bridge) { \
  71. printf("Unparseable bridge line: '%s'", #bridge); \
  72. } else { \
  73. bridge_add_from_config(bridge_line_ ##bridge); \
  74. } \
  75. tor_free(bridge);
  76. ADD_BRIDGE(bridge0);
  77. ADD_BRIDGE(bridge1);
  78. ADD_BRIDGE(bridge2);
  79. ADD_BRIDGE(bridge3);
  80. ADD_BRIDGE(bridge4);
  81. ADD_BRIDGE(bridge5);
  82. #undef ADD_BRIDGES
  83. sweep_bridge_list();
  84. }
  85. /**
  86. * Make sure our test helper works too.
  87. */
  88. static void
  89. test_bridges_helper_func_add_bridges_to_bridgelist(void *arg)
  90. {
  91. helper_add_bridges_to_bridgelist(arg);
  92. tt_finished();
  93. done:
  94. mark_bridge_list();
  95. sweep_bridge_list();
  96. }
  97. /**
  98. * Calling bridge_list_get() should create a new bridgelist if we
  99. * didn't have one before.
  100. */
  101. static void
  102. test_bridges_bridge_list_get_creates_new_bridgelist(void *arg)
  103. {
  104. const smartlist_t *bridgelist = bridge_list_get();
  105. (void)arg;
  106. tt_ptr_op(bridgelist, OP_NE, NULL);
  107. done:
  108. return;
  109. }
  110. /**
  111. * Calling clear_bridge_list() should remove all bridges from the bridgelist.
  112. */
  113. static void
  114. test_bridges_clear_bridge_list(void *arg)
  115. {
  116. const smartlist_t *bridgelist;
  117. const smartlist_t *bridgelist_after;
  118. const bridge_info_t *bridge;
  119. const bridge_info_t *bridge_after;
  120. helper_add_bridges_to_bridgelist(arg);
  121. bridgelist = bridge_list_get();
  122. tt_ptr_op(bridgelist, OP_NE, NULL);
  123. bridge = smartlist_get(bridgelist, 0);
  124. tt_ptr_op(bridge, OP_NE, NULL);
  125. clear_bridge_list();
  126. bridgelist_after = bridge_list_get();
  127. tt_ptr_op(bridgelist_after, OP_NE, NULL);
  128. bridge_after = smartlist_get(bridgelist, 0);
  129. // There now shouldn't be a first bridge
  130. tt_ptr_op(bridge_after, OP_EQ, NULL);
  131. done:
  132. return;
  133. }
  134. /**
  135. * Calling bridge_get_addrport() should give me the address and port
  136. * of the bridge. In this case, we sort the smartlist of bridges on
  137. * fingerprints and choose the first one.
  138. */
  139. static void
  140. test_bridges_bridge_get_addrport(void *arg)
  141. {
  142. smartlist_t *bridgelist;
  143. const bridge_info_t *bridge;
  144. const tor_addr_port_t *addrport;
  145. helper_add_bridges_to_bridgelist(arg);
  146. bridgelist = (smartlist_t*)bridge_list_get();
  147. tt_ptr_op(bridgelist, OP_NE, NULL);
  148. // This should be the bridge at 6.6.6.6:6666 with fingerprint
  149. // 0000000000000000000000000000000000000000
  150. bridge = smartlist_get(bridgelist, 0);
  151. tt_ptr_op(bridge, OP_NE, NULL);
  152. addrport = bridge_get_addr_port(bridge);
  153. tt_int_op(addrport->port, OP_EQ, 6666);
  154. done:
  155. mark_bridge_list();
  156. sweep_bridge_list();
  157. }
  158. /**
  159. * Calling get_configured_bridge_by_orports_digest() with two
  160. * configured bridge orports and an invalid digest should return the
  161. * bridge of the first addrport in the list.
  162. */
  163. static void
  164. test_bridges_get_configured_bridge_by_orports_digest(void *arg)
  165. {
  166. smartlist_t *orports = NULL;
  167. const smartlist_t *bridgelist;
  168. const bridge_info_t *bridge1;
  169. const bridge_info_t *bridge2;
  170. const bridge_info_t *ret;
  171. tor_addr_port_t *addrport1;
  172. tor_addr_port_t *addrport2;
  173. const char *digest;
  174. helper_add_bridges_to_bridgelist(arg);
  175. bridgelist = bridge_list_get();
  176. tt_ptr_op(bridgelist, OP_NE, NULL);
  177. // This should be the bridge at 6.6.6.6:6666 with fingerprint
  178. // 0000000000000000000000000000000000000000
  179. bridge1 = smartlist_get(bridgelist, 0);
  180. tt_ptr_op(bridge1, OP_NE, NULL);
  181. // This should be the bridge at 6.6.6.7:6667 with fingerprint
  182. // A10C4F666D27364036B562823E5830BC448E046A
  183. bridge2 = smartlist_get(bridgelist, 1);
  184. tt_ptr_op(bridge2, OP_NE, NULL);
  185. addrport1 = (tor_addr_port_t*)bridge_get_addr_port(bridge1);
  186. tt_int_op(addrport1->port, OP_EQ, 6666);
  187. addrport2 = (tor_addr_port_t*)bridge_get_addr_port(bridge2);
  188. tt_int_op(addrport2->port, OP_EQ, 6667);
  189. orports = smartlist_new();
  190. smartlist_add(orports, addrport1);
  191. smartlist_add(orports, addrport2);
  192. digest = "zzzzzzzzzzzzzzzz";
  193. ret = get_configured_bridge_by_orports_digest(digest, orports);
  194. tt_ptr_op(ret, OP_NE, NULL);
  195. tt_assert(tor_addr_port_eq(addrport1, bridge_get_addr_port(ret)));
  196. done:
  197. smartlist_free(orports);
  198. mark_bridge_list();
  199. sweep_bridge_list();
  200. }
  201. /**
  202. * Calling get_configured_bridge_by_addr_port_digest() with a digest that we do
  203. * have and an addr:port pair we don't should return the bridge for that
  204. * digest.
  205. */
  206. static void
  207. test_bridges_get_configured_bridge_by_addr_port_digest_digest_only(void *arg)
  208. {
  209. char digest[DIGEST_LEN];
  210. bridge_info_t *bridge;
  211. const char fingerprint[HEX_DIGEST_LEN] =
  212. "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  213. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  214. char ret_addr[16];
  215. uint16_t port = 11111;
  216. int ret;
  217. helper_add_bridges_to_bridgelist(arg);
  218. // We don't actually have a bridge with this addr:port pair
  219. base16_decode(digest, DIGEST_LEN, fingerprint, HEX_DIGEST_LEN);
  220. ret = tor_addr_parse(addr, "111.111.111.111");
  221. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success
  222. bridge = get_configured_bridge_by_addr_port_digest(addr, port, digest);
  223. tt_ptr_op(bridge, OP_NE, NULL);
  224. tor_addr_to_str(ret_addr, &bridge_get_addr_port(bridge)->addr, 16, 0);
  225. tt_str_op("4.4.4.4", OP_EQ, ret_addr);
  226. done:
  227. tor_free(addr);
  228. mark_bridge_list();
  229. sweep_bridge_list();
  230. }
  231. /**
  232. * Calling get_configured_bridge_by_addr_port_digest() with only an
  233. * addr:port (i.e. digest set to NULL) should return the bridge for
  234. * that digest when there is such a bridge.
  235. */
  236. static void
  237. test_bridges_get_configured_bridge_by_addr_port_digest_address_only(void *arg)
  238. {
  239. bridge_info_t *bridge;
  240. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  241. char ret_addr[16];
  242. uint16_t port = 6666;
  243. int ret;
  244. helper_add_bridges_to_bridgelist(arg);
  245. ret = tor_addr_parse(addr, "6.6.6.6");
  246. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success
  247. bridge = get_configured_bridge_by_addr_port_digest(addr, port, NULL);
  248. tt_ptr_op(bridge, OP_NE, NULL);
  249. tor_addr_to_str(ret_addr, &bridge_get_addr_port(bridge)->addr, 16, 0);
  250. tt_str_op("6.6.6.6", OP_EQ, ret_addr);
  251. done:
  252. tor_free(addr);
  253. mark_bridge_list();
  254. sweep_bridge_list();
  255. }
  256. /**
  257. * Calling get_configured_bridge_by_exact_addr_port_digest() with a digest that
  258. * we do have, and an addr:port pair we don't have, should return NULL.
  259. */
  260. static void
  261. test_bridges_get_configured_bridge_by_exact_addr_port_digest_donly(void *arg)
  262. {
  263. char digest[DIGEST_LEN];
  264. bridge_info_t *bridge;
  265. const char fingerprint[HEX_DIGEST_LEN] =
  266. "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  267. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  268. uint16_t port = 11111;
  269. int ret;
  270. helper_add_bridges_to_bridgelist(arg);
  271. // We don't actually have a bridge with this addr:port pair
  272. base16_decode(digest, DIGEST_LEN, fingerprint, HEX_DIGEST_LEN);
  273. ret = tor_addr_parse(addr, "111.111.111.111");
  274. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success
  275. bridge = get_configured_bridge_by_exact_addr_port_digest(addr, port, digest);
  276. tt_ptr_op(bridge, OP_EQ, NULL);
  277. done:
  278. tor_free(addr);
  279. mark_bridge_list();
  280. sweep_bridge_list();
  281. }
  282. /**
  283. * Calling get_configured_bridge_by_exact_addr_port_digest() with a digest that
  284. * we do have, and an addr:port pair we do have, should return the bridge.
  285. */
  286. static void
  287. test_bridges_get_configured_bridge_by_exact_addr_port_digest_both(void *arg)
  288. {
  289. char digest[DIGEST_LEN];
  290. bridge_info_t *bridge;
  291. const char fingerprint[HEX_DIGEST_LEN] =
  292. "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  293. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  294. uint16_t port = 4444;
  295. char ret_addr[16];
  296. int ret;
  297. helper_add_bridges_to_bridgelist(arg);
  298. base16_decode(digest, DIGEST_LEN, fingerprint, HEX_DIGEST_LEN);
  299. ret = tor_addr_parse(addr, "4.4.4.4");
  300. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success
  301. bridge = get_configured_bridge_by_exact_addr_port_digest(addr, port, digest);
  302. tt_ptr_op(bridge, OP_NE, NULL);
  303. tor_addr_to_str(ret_addr, &bridge_get_addr_port(bridge)->addr, 16, 0);
  304. tt_str_op("4.4.4.4", OP_EQ, ret_addr);
  305. done:
  306. tor_free(addr);
  307. mark_bridge_list();
  308. sweep_bridge_list();
  309. }
  310. /**
  311. * Calling get_configured_bridge_by_exact_addr_port_digest() with no digest,
  312. * and an addr:port pair we do have, should return the bridge.
  313. */
  314. static void
  315. test_bridges_get_configured_bridge_by_exact_addr_port_digest_aonly(void *arg)
  316. {
  317. bridge_info_t *bridge;
  318. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  319. uint16_t port = 4444;
  320. char ret_addr[16];
  321. int ret;
  322. helper_add_bridges_to_bridgelist(arg);
  323. ret = tor_addr_parse(addr, "4.4.4.4");
  324. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success
  325. bridge = get_configured_bridge_by_exact_addr_port_digest(addr, port, NULL);
  326. tt_ptr_op(bridge, OP_NE, NULL);
  327. tor_addr_to_str(ret_addr, &bridge_get_addr_port(bridge)->addr, 16, 0);
  328. tt_str_op("4.4.4.4", OP_EQ, ret_addr);
  329. done:
  330. tor_free(addr);
  331. mark_bridge_list();
  332. sweep_bridge_list();
  333. }
  334. /**
  335. * Calling find_bridge_by_digest() when we have a bridge with a known
  336. * identity digest should return the bridge's information.
  337. */
  338. static void
  339. test_bridges_find_bridge_by_digest_known(void *arg)
  340. {
  341. char digest1[DIGEST_LEN];
  342. bridge_info_t *bridge;
  343. const char fingerprint[HEX_DIGEST_LEN] =
  344. "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  345. helper_add_bridges_to_bridgelist(arg);
  346. base16_decode(digest1, DIGEST_LEN, fingerprint, HEX_DIGEST_LEN);
  347. bridge = find_bridge_by_digest(digest1);
  348. tt_ptr_op(bridge, OP_NE, NULL);
  349. /* We have to call bridge_get_rsa_id_digest() here because the bridge_info_t
  350. * struct is opaquely defined in bridges.h. */
  351. const uint8_t *digest2 = bridge_get_rsa_id_digest(bridge);
  352. tt_mem_op((char*)digest2, OP_EQ, digest1, DIGEST_LEN);
  353. done:
  354. mark_bridge_list();
  355. sweep_bridge_list();
  356. }
  357. /**
  358. * Calling find_bridge_by_digest() when we do NOT have a bridge with that
  359. * identity digest should return NULL.
  360. */
  361. static void
  362. test_bridges_find_bridge_by_digest_unknown(void *arg)
  363. {
  364. const char *fingerprint = "cccccccccccccccccccccccccccccccccccccccc";
  365. bridge_info_t *bridge;
  366. helper_add_bridges_to_bridgelist(arg);
  367. bridge = find_bridge_by_digest(fingerprint);
  368. tt_ptr_op(bridge, OP_EQ, NULL);
  369. done:
  370. mark_bridge_list();
  371. sweep_bridge_list();
  372. }
  373. /**
  374. * Calling bridge_resolve_conflicts() with an identical bridge to one we've
  375. * already configure should mark the pre-configured bridge for removal.
  376. */
  377. static void
  378. test_bridges_bridge_resolve_conflicts(void *arg)
  379. {
  380. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  381. uint16_t port = 4444;
  382. const char *digest = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
  383. const char *transport = "apple";
  384. int ret;
  385. helper_add_bridges_to_bridgelist(arg);
  386. ret = tor_addr_parse(addr, "4.4.4.4");
  387. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success
  388. bridge_resolve_conflicts((const tor_addr_t*)addr, port, digest, transport);
  389. /* The bridge should now be marked for removal, and removed when we sweep the
  390. * bridge_list */
  391. sweep_bridge_list();
  392. ret = addr_is_a_configured_bridge((const tor_addr_t*)addr, port, digest);
  393. tt_int_op(ret, OP_EQ, 0);
  394. done:
  395. tor_free(addr);
  396. mark_bridge_list();
  397. sweep_bridge_list();
  398. }
  399. /**
  400. * Calling transport_is_needed() with a transport we do need ("obfs4") and a
  401. * bogus transport that we don't need should return 1 and 0, respectively.
  402. */
  403. static void
  404. test_bridges_transport_is_needed(void *arg)
  405. {
  406. int ret;
  407. helper_add_bridges_to_bridgelist(arg);
  408. ret = transport_is_needed("obfs4");
  409. tt_int_op(ret, OP_EQ, 1);
  410. ret = transport_is_needed("apowefjaoewpaief");
  411. tt_int_op(ret, OP_EQ, 0);
  412. done:
  413. mark_bridge_list();
  414. sweep_bridge_list();
  415. }
  416. /**
  417. * Calling get_transport_by_bridge_addrport() with the address and port of a
  418. * configured bridge which uses a pluggable transport when there is no global
  419. * transport_list should return -1 and the transport_t should be NULL.
  420. */
  421. static void
  422. test_bridges_get_transport_by_bridge_addrport_no_ptlist(void *arg)
  423. {
  424. transport_t *transport = NULL;
  425. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  426. uint16_t port = 1234;
  427. int ret;
  428. helper_add_bridges_to_bridgelist(arg);
  429. ret = tor_addr_parse(addr, "1.2.3.4");
  430. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success?
  431. /* This will fail because the global transport_list has nothing in it, and so
  432. * transport_get_by_name() has nothing to return, even the the bridge *did*
  433. * say it had an obfs4 transport.
  434. */
  435. ret = get_transport_by_bridge_addrport((const tor_addr_t*)addr, port,
  436. (const transport_t**)&transport);
  437. tt_int_op(ret, OP_EQ, -1); // returns -1 on failure
  438. tt_ptr_op(transport, OP_EQ, NULL);
  439. done:
  440. tor_free(addr);
  441. mark_bridge_list();
  442. sweep_bridge_list();
  443. }
  444. #define PT_PRIVATE
  445. /**
  446. * Calling get_transport_by_bridge_addrport() with the address and port of a
  447. * configured bridge which uses a pluggable transport should return 0 and set
  448. * appropriate transport_t.
  449. */
  450. static void
  451. test_bridges_get_transport_by_bridge_addrport(void *arg)
  452. {
  453. transport_t *transport = NULL;
  454. tor_addr_t *addr = tor_malloc(sizeof(tor_addr_t));
  455. uint16_t port = 1234;
  456. int ret;
  457. helper_add_bridges_to_bridgelist(arg);
  458. mark_transport_list(); // Also initialise our transport_list
  459. ret = tor_addr_parse(addr, "1.2.3.4");
  460. tt_int_op(ret, OP_EQ, 2); // it returns the address family on success?
  461. /* After we mock transport_get_by_name() to return a bogus transport_t with
  462. * the name it was asked for, the call should succeed.
  463. */
  464. MOCK(transport_get_by_name, mock_transport_get_by_name);
  465. ret = get_transport_by_bridge_addrport((const tor_addr_t*)addr, port,
  466. (const transport_t**)&transport);
  467. tt_int_op(ret, OP_EQ, 0); // returns 0 on success
  468. tt_ptr_op(transport, OP_NE, NULL);
  469. tt_str_op(transport->name, OP_EQ, "obfs4");
  470. done:
  471. UNMOCK(transport_get_by_name);
  472. tor_free(addr);
  473. transport_free(transport);
  474. mark_bridge_list();
  475. sweep_bridge_list();
  476. }
  477. #undef PT_PRIVATE /* defined(PT_PRIVATE) */
  478. #define B_TEST(name, flags) \
  479. { #name, test_bridges_ ##name, (flags), NULL, NULL }
  480. struct testcase_t bridges_tests[] = {
  481. B_TEST(helper_func_add_bridges_to_bridgelist, 0),
  482. B_TEST(bridge_list_get_creates_new_bridgelist, 0),
  483. B_TEST(clear_bridge_list, 0),
  484. B_TEST(bridge_get_addrport, 0),
  485. B_TEST(get_configured_bridge_by_orports_digest, 0),
  486. B_TEST(get_configured_bridge_by_addr_port_digest_digest_only, 0),
  487. B_TEST(get_configured_bridge_by_addr_port_digest_address_only, 0),
  488. B_TEST(get_configured_bridge_by_exact_addr_port_digest_donly, 0),
  489. B_TEST(get_configured_bridge_by_exact_addr_port_digest_both, 0),
  490. B_TEST(get_configured_bridge_by_exact_addr_port_digest_aonly, 0),
  491. B_TEST(find_bridge_by_digest_known, 0),
  492. B_TEST(find_bridge_by_digest_unknown, 0),
  493. B_TEST(bridge_resolve_conflicts, 0),
  494. B_TEST(get_transport_by_bridge_addrport_no_ptlist, 0),
  495. B_TEST(get_transport_by_bridge_addrport, 0),
  496. B_TEST(transport_is_needed, 0),
  497. END_OF_TESTCASES
  498. };