Skip to content

Update to latest oxnet and use new SocketAddrJson type(s) in API #767

@jgallagher

Description

@jgallagher

(This fell out of proptesting the new MGD BGP scrimlet reconciler.)

omicron currently has a bug if attempting to use an IPv6 numbered BGP peer; it formats the BgpPeerConfig::host field via format!("{ip}:179"}, which is incorrect for IPv6 addresses since that omits the necessary []s around the IP.

We can fix this in omicron by changing that format string to SocketAddr::new(ip, 179).to_string(), but even better would be if the client saw the field as a SocketAddr instead of a String. maghemite's API is already doing the right thing here, as best it can, and defines this field as a SocketAddr. However, as of oxidecomputer/oxnet#82 (published today in oxnet 0.1.6), if we change this field type to SocketAddrJson and add this to the mg-admin-client progenitor spec:

    crates = {
        std = "1.0.0",
    },

then the client will know the field needs to be a SocketAddr.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions