Skip to content

Conversation

@RahulThennarasu
Copy link

Addresses #186

Changes

  • Added optional gateway field to IpRouteAddLinkRequest proto
  • Updated routeAdd() to handle gateway routes via netlink
  • Added Route struct and routes property to Interface protocol
  • LinuxContainer/LinuxPod now configure custom routes from interface.routes

@dcantah
Copy link
Member

dcantah commented Oct 30, 2025

What's going on in the commits?

@dcantah
Copy link
Member

dcantah commented Nov 3, 2025

@RahulThennarasu Can you run make fmt to fix the formatting issues, and then squash all the commits into one?

@RahulThennarasu
Copy link
Author

@dcantah I've fixed the formatting issues with make fmt and squashed all the commits into one. It's ready to be reviewed.

Comment on lines 20 to 23
public let destination: String

/// Gateway IP address for this route
public let gateway: String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these mutable (var) please

/// The interface MAC address, or nil to auto-configure the address.
var macAddress: String? { get }

var routes: [Route] { get }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation like the other fields

public var macAddress: String?
public var routes: [Route] { [] }

public init(address: String, gateway: String?, macAddress: String? = nil) {
Copy link
Member

@dcantah dcantah Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave the type defined as public var routes: [Route] but just add it to the constructor with a default value of []

public let address: String
public let gateway: String?
public let macAddress: String?
public var routes: [Route] { [] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

func down(name: String) async throws
func addressAdd(name: String, address: String) async throws
func routeAddDefault(name: String, gateway: String) async throws
func routeAddLink(name: String, address: String, gateway: String, srcAddr: String) async throws
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to add an unsupported entry to the bottom like what is done for `closeProcessStdin1 and the others

@RahulThennarasu
Copy link
Author

@dcantah I've made the changes, it should be good now.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants