Commit Graph

15 Commits

Author SHA1 Message Date
Cuong Manh Le 4896563e3c Various improvements and bug fixes
- Watch more events for lease file changes
 - Improving network up detection by using bootstrap IPv6 along side
   IPv4 one.
 - Emitting log to notice user that ctrld is starting.
 - Using systemd wrapper to provide correct status.
 - Restoring DNS on stop on Windows.
2023-08-14 21:22:11 +07:00
Cuong Manh Le d292e03d1b Satisfying staticcheck linter 2023-08-10 00:33:42 +07:00
Cuong Manh Le e5389ffecb internal/clientinfo: use all possible source IP for listing clients 2023-08-09 23:57:20 +07:00
Cuong Manh Le 6e27f877ff internal/clientinfo: use ptr cache when listing clients 2023-08-09 23:55:29 +07:00
Cuong Manh Le 39a2cab051 internal/clientinfo: only do self discover with client id
While at it, also ensure that client info table was initialized before
doing any lookup.
2023-08-09 23:55:13 +07:00
Cuong Manh Le 19bc44a7f3 all: prevent data race when accessing zerolog.Logger 2023-08-09 23:54:23 +07:00
Cuong Manh Le 59dc74ffbb internal: record correct interfaces for queries from router on Firewalla 2023-08-09 23:54:23 +07:00
Cuong Manh Le 437fb1b16d all: add clients list command to debug Mac discovery 2023-08-09 23:54:23 +07:00
Cuong Manh Le e43b2b5530 internal/clientinfo: add doc comments for mdns operations
While at it, also remove un-used channel argument of probe function.
2023-08-09 23:54:23 +07:00
Cuong Manh Le 2cd8b7e021 internal/clientinfo: remove dhcp from refresher list
dhcp lease files are watched separately using fsnotify, it does not need
to be in refresher list.
2023-08-09 23:54:23 +07:00
Cuong Manh Le d6768c4c39 internal/clientinfo: use default route IP as self client info 2023-08-09 23:54:23 +07:00
Cuong Manh Le 59a895bfe2 internal/clientinfo: improving mdns discovery
- Prevent duplicated log message.
 - Distinguish in case of create/update hostname.
 - Stop probing if network is unreachable or invalid.
2023-08-09 23:54:23 +07:00
Cuong Manh Le cacd957594 internal/clientinfo: do not lower case hostname 2023-08-09 23:54:23 +07:00
Cuong Manh Le 76d2e2c226 Improving Mac discovery 2023-08-09 23:54:23 +07:00
Cuong Manh Le 9fe6af684f all: watch lease files if send client info enabled
So users who run ctrld in Linux can still see clients info, even though
it's not an router platform that ctrld supports.
2023-08-09 23:54:23 +07:00