Using a UDP port as input twice results in first use ignored

42 views
Skip to first unread message

Jonathan Brewer

unread,
Jul 24, 2022, 11:11:11 PM7/24/22
to kplex
Hi folks,

Love kplex & wouldn't know what to do without it.

In most instances if you input a broken config, kplex won't start.

In the case where you mess up and use a UDP input port twice, with two different names, input from the first use is ignored silently. Like this:

[udp]
name=thingone
port=10108
direction=in

[udp]
name=thingtwo
port=10108
direction=in

Above config is accepted - kplex happily starts and functions otherwise - but all input from the first use of 10108 is lost.

My fault entirely for getting the config wrong - but it'd be great to get a warning if an input is used twice. I have a couple kplex servers with 500+ line configs. (managed in git thankfully)

Cheers,

Jon 


Keith Young

unread,
Aug 3, 2022, 7:34:57 PM8/3/22
to kplex
Apologies for the delay in responding (<excuses,excuses>)

Whether I say "hmm..interesting...have you tried with the develop branch?" or "not a bug as such, although maybe I should document expected behaviour better" depends on the answer to the question "are these receiving unicast or broadcast udp?"

Unicast will get delivered to one socket only.  broadcast *should* be delivered to all.  I'm struggling to think of a convoluted example of a setup where someone might be doing something with 2 interfaces on one port with different ifilters but I'm guessing there will be one :-)
If you're not seeing broadcast udp on both interfaces then that would be more of a bug than a (tenuous) feature (although less of a deliberate "feature" and more "just the way sockets work"). 
Reply all
Reply to author
Forward
0 new messages