Commit Graph
10 Commits
Author SHA1 Message Date
Andrew Johnson 6cf9fe9d83 Silence Repeater announcement in non-debug mode 2026-08-07 13:11:28 -05:00
Érico Nogueira b87b6c91ff Fix UAF in caRepeaterThread
The ca_repeater function has some failure cases which can cause it to
return. In such a situation, a reference to the current thread's
epicsThreadId is kept in the taskwd, causing an eventual use-after-free
when the taskwd tries to determine the task's status.

We fix this problem by removing the thread from the taskwd if
ca_repeater ever returns.
2026-07-06 16:29:52 -07:00
Andrew Johnson e271752158 Added -d option to caRepeater, sets debug level
Added debug messages for client verification.

With -d the repeater shows client events, e.g.

  $ caRepeater -d
  CA Repeater: Attached and initialized
  New client on port 60307
  Verified 1 active clients
  New client on port 52541
  Verified 2 active clients
  Client on port 60307 refused message
  Deleted client on port 60307
  Client on port 52541 refused message
  Deleted client on port 52541
  ^C

Running "caRepeater -dd" also shows beacon forwarding and
individual client verification:

  $ caRepeater -dd
  CA Repeater: Attached and initialized
  New client on port 49968
  Client on port 49968 is alive
  Verified 1 active clients
  Sent to port 49968
  Sent to port 49968
  Sent to port 49968
  New client on port 65377
  Sent to port 49968
  Client on port 49968 is alive
  Client on port 65377 is alive
  Verified 2 active clients
  Sent to port 49968
  Sent to port 65377
  Sent to port 49968
  Sent to port 65377
  Client on port 49968 refused message
  Deleted client on port 49968
  Sent to port 65377
  Sent to port 65377
  Client on port 65377 refused message
  Deleted client on port 65377
  ^C
2026-03-10 12:42:18 -05:00
zimoch 6d85a36397 remove needless pointer casts 2025-12-17 16:34:58 -08:00
Michael Davidsaver e34b6c5c0c Fix spelling in comments
Should be non-functional, except for some error message strings.
2021-08-29 07:27:50 -07:00
Andrew Johnson 3c99391d93 Added SPDX License ID to all EPICS-original source files
In some cases the license-identification header was missing,
so I added that as well. Replaced the remaining headers that
specifically identified "Versions 3.13.7 and higher".

Makefiles and the build system were deliberately excluded.
2020-08-03 11:53:01 -05:00
zimoch 36a8b51d8e CleanupWhitespace
removed spaces at end of line

replaced tabs with spaces
2020-05-20 14:48:09 -07:00
Andrew Johnson 18402f0354 Convert modules/ca to use LIBCA_API instead of epicsShare
Also unified the header exclusion guard names,
removed a couple of files that are no longer used,
dropped the '3.13.7' from the Copyright header.
2020-03-09 23:53:22 -05:00
hanlet 97bf9171c6 Added Multicast to caRepeater
Modifications to allow for CA multicast listening by adding multicast address
from EPICS_CA_BEACON_ADDR_LIST (or EPICS_CA_ADDR_LIST if beacon list is empty).
Original modifications from Jim Smedinghoff, with further changes by Pierrick Hanlet.
2020-02-14 11:42:17 +00:00
Ralph Lange e165567234 Move all under modules/ca 2018-06-19 11:33:25 +02:00