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

parseIPList Function fails to process all valid IPs When a invalid entries is present in router whitelist ip list #620

Closed
mJace opened this issue Aug 30, 2024 · 3 comments

Comments

@mJace
Copy link

mJace commented Aug 30, 2024

Description

The parseIPList function currently fails to handle IP lists that contain both valid and invalid IPs or CIDRs. When the function encounters an invalid entry, it immediately returns an empty string, which prevents any valid IPs from being processed or returned.

Expected Behavior

  • The function should process the entire list of IPs or CIDRs.
  • It should return a string of all valid IPs and CIDRs, even if there are some invalid entries.
  • Invalid entries should be logged for debugging purposes, but they should not cause the function to exit prematurely.

Current Behavior

  • The function returns an empty string as soon as it encounters an invalid IP or CIDR.
  • No valid IPs are returned if any invalid entries are found.

Steps to Reproduce

  1. Provide a list of IPs or CIDRs that includes both valid and invalid entries to the parseIPList function.
  2. Observe that the function returns an empty string, regardless of the valid entries present.

Suggested Solution

Modify the parseIPList function to:

  • Collect valid IPs and CIDRs while logging invalid ones.
  • Return a space-separated string of valid IPs and CIDRs.
  • Log all invalid entries for visibility and debugging.

Additional Information

  • A recent PR addresses this issue by enhancing the function to handle mixed validity lists more gracefully.
  • This change improves the robustness of IP list processing and provides better insights into invalid entries.
@mJace
Copy link
Author

mJace commented Aug 30, 2024

Related PR #621

@candita
Copy link
Contributor

candita commented Oct 30, 2024

Replaced by https://issues.redhat.com/browse/OCPBUGS-39403.
/close

Copy link
Contributor

openshift-ci bot commented Oct 30, 2024

@candita: Closing this issue.

In response to this:

Replaced by https://issues.redhat.com/browse/OCPBUGS-39403.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot closed this as completed Oct 30, 2024
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

No branches or pull requests

2 participants