Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log new and terminating telnet connections only when debug flag is set #1380

Merged
merged 2 commits into from
Jul 8, 2022

Conversation

yubiuser
Copy link
Member

@yubiuser yubiuser commented Jul 7, 2022

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?: {replace this text with a number from 1 to 10, with 1 being not familiar, and 10 being very familiar}

5

PR #1370 changed the telnet API error handling. It also logs when new telnet connections were made. However, the web interface makes a lot of connections via the API, all of them get logged. This creates logspam.

This PR changes the behavior to only log if the debug flag is set.

@yubiuser yubiuser requested review from DL6ER and a team July 7, 2022 22:27
@DL6ER
Copy link
Member

DL6ER commented Jul 8, 2022

It seems to be there already on master:

FTL/src/api/socket.c

Lines 505 to 506 in 37e6052

if(config.debug & DEBUG_API)
logg("Accepting new telnet connection at socket %d", csck);

Copy link
Member

@DL6ER DL6ER left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also be here:

logg("Terminating IPv4 telnet thread");

Signed-off-by: Christian König <[email protected]>
@yubiuser
Copy link
Member Author

yubiuser commented Jul 8, 2022

You did not link master but the current branch. On master

FTL/src/api/socket.c

Lines 504 to 505 in bc5077d

logg("Accepting new telnet connection at socket %d", csck);
.
__
Pushed fix for terminating

@yubiuser yubiuser requested a review from DL6ER July 8, 2022 05:57
@yubiuser yubiuser changed the title Log new telnet connections only when debug flag is set Log new ans terminating telnet connections only when debug flag is set Jul 8, 2022
@yubiuser yubiuser changed the title Log new ans terminating telnet connections only when debug flag is set Log new and terminating telnet connections only when debug flag is set Jul 8, 2022
@yubiuser yubiuser merged commit d23b6ac into development Jul 8, 2022
@yubiuser yubiuser deleted the telnet_log branch July 8, 2022 07:00
@yubiuser yubiuser mentioned this pull request Jul 8, 2022
@PromoFaux PromoFaux restored the telnet_log branch August 17, 2022 20:23
@PromoFaux PromoFaux deleted the telnet_log branch August 17, 2022 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants