Skip to content

Conversation

@giovanni-bellini-argo
Copy link
Contributor

@giovanni-bellini-argo giovanni-bellini-argo commented Dec 10, 2025

Add inet addr6 support to fortinet fnsysctl ifconfig

@giovanni-bellini-argo
Copy link
Contributor Author

i also encountered an "Interrupt" option on an older version (v5.x) of my firewalls and i'm unsure whether it's still present in newer versions of ifconfig.

i didn't add it in the pull request for the above reason. tell me if u want to see it in the pull request.

@mjbear mjbear changed the title update on fortinet fnsysctl ifconfig added support for inet addr6 option Add addr6 support to fortinet fnsysctl ifconfig Dec 13, 2025
@mjbear
Copy link
Collaborator

mjbear commented Dec 13, 2025

i also encountered an "Interrupt" option on an older version (v5.x) of my firewalls and i'm unsure whether it's still present in newer versions of ifconfig.

i didn't add it in the pull request for the above reason. tell me if u want to see it in the pull request.

@giovanni-bellini-argo
Do you have some example output you could post in code fences on this PR to illustrate the Interrupt option you see?
Thank you!

@mjbear
Copy link
Collaborator

mjbear commented Dec 13, 2025

I added patterns to capture the IPv6 prefix length as PREFIX_LENGTH from the data model.

In terms of normalization, this is one of those situations where more discussion may occur or maybe we implement normalization at a later time for the next major release version.

mjbear
mjbear previously approved these changes Dec 13, 2025
@mjbear mjbear self-requested a review December 13, 2025 18:17
@mjbear mjbear dismissed their stale review December 13, 2025 18:19

Dismissing review since there are remaining questions.

@giovanni-bellini-argo
Copy link
Contributor Author

here is the requested example:

lan3    Link encap:Ethernet  HWaddr 70:4C:A5:B8:4F:C7
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:0 (0  Bytes)  TX bytes:0 (0  Bytes)
        Interrupt:255

lan4    Link encap:Ethernet  HWaddr 70:4C:A5:B8:4F:C8
        UP BROADCAST MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:0 (0  Bytes)  TX bytes:0 (0  Bytes)
        Interrupt:255

lan5    Link encap:Ethernet  HWaddr 70:4C:A5:B8:4F:C9
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:0 (0  Bytes)  TX bytes:0 (0  Bytes)
        Interrupt:255

i couldn't find in which versions of ifconfig this line is included so i can't state this line isn't included in newer versions, but the only case i found is in a v5.x, as state above.

@giovanni-bellini-argo
Copy link
Contributor Author

I added patterns to capture the IPv6 prefix length as PREFIX_LENGTH from the data model.

In terms of normalization, this is one of those situations where more discussion may occur or maybe we implement normalization at a later time for the next major release version.

as for normalization what u want to normalize exactly?
i see both terms IPV6_ADDRESS and PREFIX_LENGTH in the data_model file.

@mjbear
Copy link
Collaborator

mjbear commented Dec 16, 2025

i couldn't find in which versions of ifconfig this line is included so i can't state this line isn't included in newer versions, but the only case i found is in a v5.x, as state above.

Nice. Thank you.
It's probably best to add this since you noticed it - that way the template doesn't break if someone has some pretty old systems (or if the Interrupt shows up in the output in a later FortiOS release).

I was going to obfuscate your MAC addresses in the test data (in case you're worried about that), put some of those interfaces in a separate file, and generate the yaml. But I can't push those updates to your branch any longer. If you'd like me to open a PR against your fork I certainly can.

I added patterns to capture the IPv6 prefix length as PREFIX_LENGTH from the data model.
In terms of normalization, this is one of those situations where more discussion may occur or maybe we implement normalization at a later time for the next major release version.

as for normalization what u want to normalize exactly? i see both terms IPV6_ADDRESS and PREFIX_LENGTH in the data_model file.

Fair question as I wasn't clear.

Whether we want to differentiate IPv6 prefixes from IPv4 with the name.
(Safe to say probably no need to do anything different than we have on this template currently.)

@giovanni-bellini-argo
Copy link
Contributor Author

first of all i can confirm the interrupts can be found on v6 and i added them to the pull request as suggeted.

as for the mac addresses, don't worry, i aleady obfuscated them so no need to, and they are of a machine we only use for tests which is not exposed.

as for the normalization i would suggest that till someone finds any related problems it's ok to keep it like this.

@mjbear
Copy link
Collaborator

mjbear commented Dec 23, 2025

@giovanni-bellini-argo
Does capturing the interrupt number provide value?

I'm thinking that maybe it's enough to just match the line (but not capture the number).
Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants