cockpit-machines icon indicating copy to clipboard operation
cockpit-machines copied to clipboard

Switch to a different IP implementation

Open jelly opened this issue 3 years ago • 1 comments

In our webpack.config.js we have a todo about the ip module:

        // TODO: The following fallbacks are needed for ip module - replace this module with one better maintained
        fallback: {
            "browser": false,
            "os": false,
            "buffer": require.resolve("buffer"),
        }

In src/components/networks/utils.js we use the ip module to validate various parts of IP address validity, netmask, broadcast address, format, etc.

A promising candidate is ipaddr.js, no external deps. Alternative ip-address

jelly avatar Jan 13 '22 10:01 jelly

Latest version 2.0.0 solves the buffer ssue but the 'os' workaround is still needed. Opened an upstream issue for this https://github.com/indutny/node-ip/issues/127

KKoukiou avatar Jan 31 '23 12:01 KKoukiou

We now use ipaddr.js f27fc31c514be87f643153b4a3b64ba7300c6f34

jelly avatar Sep 05 '24 14:09 jelly