This is useful when DNS name is used for server address. Without logging
the actual IP address there was no way to know which server refused the
connection or returned error.
Valgrind report:
Invalid read of size 8
at 0x41CCB7: get_socket.constprop.1 (udp.c:81)
by 0x41CDC7: udp_connect_input (udp.c:102)
by 0x404BDE: main (tsdecrypt.c:978)
Address 0x607a410 is 0 bytes after a block of size 64 alloc'd
at 0x4C2A359: malloc (vg_replace_malloc.c:270)
by 0x594955C: gaih_inet (in /lib64/libc-2.17.so)
by 0x594D18C: getaddrinfo (in /lib64/libc-2.17.so)
by 0x41CB95: get_socket.constprop.1 (udp.c:61)
by 0x41CDC7: udp_connect_input (udp.c:102)
by 0x404BDE: main (tsdecrypt.c:978)
Increase how much seconds to assume the key is valid.
10 seconds is a bit low, there are services that change their key
every 15 seconds. Increase the period in which we assume the key is
valid to 30 seconds.
Before this it was possible for pthread_join to hang waiting for
threads to finish. Also if there was no input data exiting was
delayed by a second.
After this patch the exit is instant even if there is no input data
and if a thread hangs and the main process can't stop it after two
seconds tsdecrypt exits anyway.
Fix regression related to output to other than multicast addresses.
When IPv6 support was introduced in commit 7e88477439 apparantly the
output to addresses that were not multicast was broken. This commit
fixes the regression.
This patch adds two new EMM counters in the regular stats messages.
Now the counters are:
Received - How much EMMs were received from the input.
Skipped - How much EMMs were skipped because of filtering.
Sent - How much EMMs were added to the sending queue.
Processed - How much EMMs were sent to the CAMD server for processing.
Add support for IPv6 and for multiple CAMD addresses.
This patch adds support for connecting to CAMD over IPv6. Nice addition
is that now tsdecrypt tries each of the addresses returned when CAMD
hostname is resolved and connects to the one that works. Resolving
of the server address is done before each connect, which allows for
uninterupted migration of CAMD servers by just changing their DNS
record.
IPv6 functionality can be disabled by using -4/--ipv4 options or
if you fancy only IPv6 servers -6/--ipv6 can be used.
Allow camd server address to be resolved, not only set by IP address.
The limitation is that resolving the hostname is performed only
once at tsdecrypt startup. If DNS changes while tsdecrypt is running,
tsdecrypt won't notice that.
Flush request queue to prevent collecting too much data.
Since it is possible for EMMs and ECMs to be removed from
the queues when hard limits are reached, it is a good idea
to clear the request queue too. Without this when queues
reach their hard limits, request queue will grow slowly eating
a bit of memory. It is not much but it is wasted memory.