Commit Graph

11 Commits

Author SHA1 Message Date
Alexey Milovidov
87a7133659 Add a test and fix the code 2021-05-21 08:19:08 +03:00
Alexey Milovidov
b553c5a117 Recognize more addresses as local 2021-05-21 08:19:08 +03:00
Alexey Milovidov
335dafe887 Revert "Minor change"
This reverts commit db9f68fced.
2021-05-20 01:16:43 +03:00
Alexey Milovidov
db9f68fced Minor change 2021-05-20 01:16:11 +03:00
Azat Khuzhin
92632bf0c1 Fix isLocalAddress() (ifa_addr maybe NULL)
From getifaddrs(3):

    The ifa_addr field points to a structure containing the interface
    address.  (The sa_family subfield should be consulted to
    determine the format of the address structure.)  This field may
    contain a null pointer.

I have the problem with tun0, that creates points-to-point address, so
getifaddrs() returns NULL ifa_addr for one of addrs for tun0.
You can check this, using this simple example - [1].

  [1]: https://gist.github.com/azat/cc667d145bc74215c40cdbb69f38189b
2021-05-20 00:04:11 +03:00
alesapin
6127ba901e Small improvements 2021-05-17 19:29:11 +03:00
alesapin
acaf260a2e Better 2021-05-17 19:18:38 +03:00
alesapin
b4f07a017c Space 2021-05-17 18:32:34 +03:00
alesapin
5a0d0a1717 Much simplier isLocalAddress 2021-05-17 18:31:44 +03:00
Artem Zuikov
51ba12c2c3
Try speedup build (#14809) 2020-09-15 12:55:57 +03:00
Ivan Lezhankin
06446b4f08 dbms/ → src/ 2020-04-03 18:14:31 +03:00