Skip to content

SNMP: Improve parsing of OIDs containing IP addresses#2419

Closed
rousskov wants to merge 1 commit into
squid-cache:masterfrom
measurement-factory:SQUID-111-SNMP-oid-address-size
Closed

SNMP: Improve parsing of OIDs containing IP addresses#2419
rousskov wants to merge 1 commit into
squid-cache:masterfrom
measurement-factory:SQUID-111-SNMP-oid-address-size

Conversation

@rousskov
Copy link
Copy Markdown
Contributor

Broken since 2007 commit cc192b5 made a false "4 or 16" assumption,
possibly influenced by bad assumptions in earlier client_Inst() code.

Also improved const-correctness to get fixed oid2addr() code to compile.

Broken since 2007 commit cc192b5 made a false "4 or 16" assumption,
possibly influenced by bad assumptions in earlier client_Inst() code.

Also improved const-correctness to get fixed oid2addr() code to compile.
Comment thread src/snmp_core.cc
if ( size == sizeof(struct in_addr) )
cp = (u_char *) &(i4addr.s_addr);
else
else if ( size == sizeof(struct in6_addr) )
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It would be better to use i6addr variable instead of guessing its type inside sizeof(), but that would break symmetry with the above IPv4 code unless we introduce more out-of-scope polishing changes.

I also duplicated odd if line formatting to keep IPv4 and IPv6 code as similar as possible without introducing even more changes.

@rousskov rousskov added the S-could-use-an-approval An approval may speed this PR merger (but is not required) label May 11, 2026
@yadij yadij added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels backport-to-v7 maintainer has approved these changes for v7 backporting and removed S-could-use-an-approval An approval may speed this PR merger (but is not required) labels May 13, 2026
squid-anubis pushed a commit that referenced this pull request May 13, 2026
Broken since 2007 commit cc192b5 made a false "4 or 16" assumption,
possibly influenced by bad assumptions in earlier client_Inst() code.

Also improved const-correctness to get fixed oid2addr() code to compile.
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label May 13, 2026
@kinkie kinkie removed the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label May 19, 2026
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label May 19, 2026
@rousskov
Copy link
Copy Markdown
Contributor Author

@eduard-bagdasaryan, could you please check Anubis configuration? AFAICT, it was not updated when FreeBSD tests were removed in 8c76249, and Anubis is now waiting for the staging tests that will never run.

@kinkie
Copy link
Copy Markdown
Contributor

kinkie commented May 20, 2026

@eduard-bagdasaryan, could you please check Anubis configuration? AFAICT, it was not updated when FreeBSD tests were removed in 8c76249, and Anubis is now waiting for the staging tests that will never run.

I've updated the config.
I have a small feature request for Anubis: in place of (or in addition to) printing the full list of successful checks, print their count - the log contains the list of requirements but too much detail the results, it's hard to interpret it

@rousskov
Copy link
Copy Markdown
Contributor Author

@eduard-bagdasaryan, could you please check Anubis configuration? AFAICT, it was not updated when FreeBSD tests were removed in 8c76249, and Anubis is now waiting for the staging tests that will never run.

I've updated the config.

AFAICT, it did not help:

PR2419 (head: 6c03eb staged: 8f73b1) ... did not merge: waiting for staging tests completion
.... "time":"2026-05-20T21:03:43.202Z"

I have a small feature request for Anubis: in place of (or in addition to) printing the full list of successful checks, print their count - the log contains the list of requirements but too much detail the results, it's hard to interpret it

This request is best submitted at https://github.com/measurement-factory/anubis/issues but is it possible that this is already implemented? I see the following in the log that seems to contain the counters you are asking for:

PR2419 ... staging status details: ... Staging expected/required/optional: 101/95/0

The "expected" 101 count matches the updated staging_checks setting in Anubis configuration for Squid. GitHub shows 94 staging checks (all are considered to be required IIRC). Anubis copies PR Approval status check, bringing that count to the reported "95". Anubis then waits for the missing 6 checks...

That is just my quick interpretation -- I did not check any details. @eduard-bagdasaryan, please correct me if I got it wrong.

@kinkie
Copy link
Copy Markdown
Contributor

kinkie commented May 20, 2026

@eduard-bagdasaryan, could you please check Anubis configuration? AFAICT, it was not updated when FreeBSD tests were removed in 8c76249, and Anubis is now waiting for the staging tests that will never run.

I've updated the config.

AFAICT, it did not help:

PR2419 (head: 6c03eb staged: 8f73b1) ... did not merge: waiting for staging tests completion
.... "time":"2026-05-20T21:03:43.202Z"

I have a small feature request for Anubis: in place of (or in addition to) printing the full list of successful checks, print their count - the log contains the list of requirements but too much detail the results, it's hard to interpret it

This request is best submitted at https://github.com/measurement-factory/anubis/issues but is it possible that this is already implemented? I see the following in the log that seems to contain the counters you are asking for:

PR2419 ... staging status details: ... Staging expected/required/optional: 101/95/0

The "expected" 101 count matches the updated staging_checks setting in Anubis configuration for Squid. GitHub shows 94 staging checks (all are considered to be required IIRC). Anubis copies PR Approval status check, bringing that count to the reported "95". Anubis then waits for the missing 6 checks...

That is just my quick interpretation -- I did not check any details. @eduard-bagdasaryan, please correct me if I got it wrong.

You seem to be right.
Currently the staging test has 95 tests. This means that it was not only the freebsd test that has been removed.
Okay, I'll tune anubis to pass with 95 successful results on staging. We are due to update tests soon anyway, as both Ubuntu and Fedora have released new versions.

@squid-anubis squid-anubis added M-failed-staging-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels labels May 20, 2026
@rousskov
Copy link
Copy Markdown
Contributor Author

Okay, I'll tune anubis to pass with 95 successful results on staging.

PR2419 (head: 6c03eb staged: 8f73b1 history: load,merge,update) staging checks succeeded

After your adjustments, Anubis went further, but it ran into other problems. At this time, I think it is best to give Eduard a chance to check things out.

@rousskov rousskov removed the M-failed-staging-other https://github.com/measurement-factory/anubis#pull-request-labels label May 20, 2026
squid-anubis pushed a commit that referenced this pull request May 21, 2026
Broken since 2007 commit cc192b5 made a false "4 or 16" assumption,
possibly influenced by bad assumptions in earlier client_Inst() code.

Also improved const-correctness to get fixed oid2addr() code to compile.
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label May 21, 2026
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v7 maintainer has approved these changes for v7 backporting M-merged https://github.com/measurement-factory/anubis#pull-request-labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants