Project

General

Profile

Bug #2418

[hdhomerun] Device detection broadcasts on all interfaces despite -b set

Added by Brendan Pike about 10 years ago. Updated about 10 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
General
Target version:
-
Start date:
2014-10-24
Due date:
% Done:

100%

Estimated time:
Found in version:
git-master
Affected Versions:

Description

The hdhomerun detection which runs every 30 seconds actually sends a datagram broadcast request to 65001 on all active interfaces despite tvheadend listening on a single address with the -b option set.

This is not a good thing on a server with many different interfaces, and its also broadcasting on external interfaces.
It should only attempt to broadcast on whatever interface tvheadend is bound to if set.

Also, why does it broadcast every 30 seconds?
This should either be done when you have the web interface open on the DVB devices screen and always upon tvheadend startup.
I don't believe there is a need to keep detecting hdhomerun devices every 30 seconds in a loop, especially not when it broadcasts on all interfaces.

Yes, I'm aware that this could also be some braindead mechanism built-in to the libhdhomerun binary, in which I apologize but I would love to see a workaround of some sorts.

Cheers,

History

#1

Updated by Brendan Pike about 10 years ago

Okay, looking through the source more, it appears you can specify the target_ip of the scan, however in tvhdhomerun.c that field is hardcoded to 0, which I guess means scan everything on the machine.

int numDevices = hdhomerun_discover_find_devices_custom(0,
HDHOMERUN_DEVICE_TYPE_TUNER,
HDHOMERUN_DEVICE_ID_WILDCARD,
result_list,
MAX_HDHOMERUN_DEVICES);

hdhomerun_discover.c in libhdhomerun sources:

int hdhomerun_discover_find_devices_custom(uint32_t target_ip, uint32_t device_type, uint32_t device_id, struct hdhomerun_discover_device_t result_list[], int max_count)
   {
struct hdhomerun_discover_t *ds = hdhomerun_discover_create();
#2

Updated by Beralt Meppelink about 10 years ago

Brendan Pike wrote:

Yes, I'm aware that this could also be some braindead mechanism built-in to the libhdhomerun binary, in which I apologize but I would love to see a workaround of some sorts.

The current approach is some left over legacy and is by no means perfect. I only modified the frontend code and pushed that into the current tree.

Running this detection stuff every 30 seconds is just plain stupid. But this is easy to fix temporary: remove the timer and do discovery only on startup. This does not fix the datagram broadcast upon startup.

Some option in the GUI would be great but I don't know how to implement that yet.

#4

Updated by Beralt Meppelink about 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|9bb73c118da567f5a4db448394b82b5a409896ee.

#5

Updated by Brendan Pike about 10 years ago

Beralt Meppelink wrote:

Applied in changeset commit:tvheadend|9bb73c118da567f5a4db448394b82b5a409896ee.

Cheers for that, thumbsup

Also available in: Atom PDF