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

*: convert struct interface->connected to DLIST #14863

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

eqvinox
Copy link
Contributor

@eqvinox eqvinox commented Nov 22, 2023

Replace struct list * with DLIST(if_connected, ...).

NB: while converting this, I found multiple places using connected prefixes assuming they were IPv4 without checking:

  • vrrpd/vrrp.c: vrrp_socket()
  • zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(), irdp_advert_off()

(these fixes are really hard to split off into separate commits as that would require going back and reapplying the change but with the old list handling)


Bonus removal of unused struct members included for free :D

Replace `struct list *` with `DLIST(if_connected, ...)`.

NB: while converting this, I found multiple places using connected
prefixes assuming they were IPv4 without checking:

- vrrpd/vrrp.c: vrrp_socket()
- zebra/irdp_interface.c: irdp_get_prefix(), irdp_if_start(),
  irdp_advert_off()

(these fixes are really hard to split off into separate commits as that
would require going back and reapplying the change but with the old list
handling)

Signed-off-by: David Lamparter <[email protected]>
Both of these fields are just straight up completely unused.

Signed-off-by: David Lamparter <[email protected]>
@eqvinox
Copy link
Contributor Author

eqvinox commented Nov 22, 2023

< WARNING: Too many leading tabs - consider code refactoring
< 721: FILE: /tmp/f1-1839214/interface.c:721:

one refactor at a time

@donaldsharp donaldsharp merged commit 25f1b66 into FRRouting:master Nov 23, 2023
77 of 78 checks passed
@eqvinox eqvinox deleted the if-connected-dlist branch November 24, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants