Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
Night's Watch
-
ghost-9.12
-
Needs Assessment
-
Needs Assessment
Description
ip route get 1 is not the right way to get the default route egress interface. That's the equivalent of ip route get 1.0.0.0. There is nothing special about the 1.0.0.0 address, so it should not be treated like a way to find out the default route egress interface.
A better way to get the default route egress interface would be to use the output of ip route show default. This is how it's done with the old tools here: https://github.com/puppetlabs/facter/blob/23a6be6494c0729eaf439e173020bb3be88b75c6/lib/facter/resolvers/networking_resolver.rb#L23
Also, this method currently neglects to take IPv6 into consideration. There should be a retrieve_default_interface_v6 method that looks at ip -6 route show default and populates a networking.primary6 fact.
Attachments
Issue Links
- relates to
-
FACT-2895 Add networking.primary6 fact
-
- Accepted
-