From 2f5a4d59cb8d494bcf1a64d45d84bcd8fd4a7f06 Mon Sep 17 00:00:00 2001 From: Hitoshi Irino Date: Mon, 24 Jun 2019 00:39:22 +0900 Subject: BGP connection on a speecified interface (including which is associated VRF) using syscall SO_BINDTODEVICE --- internal/pkg/config/bgp_configs.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/pkg/config/bgp_configs.go') diff --git a/internal/pkg/config/bgp_configs.go b/internal/pkg/config/bgp_configs.go index 37fe1b39..0e375619 100644 --- a/internal/pkg/config/bgp_configs.go +++ b/internal/pkg/config/bgp_configs.go @@ -2548,6 +2548,10 @@ type TransportState struct { // Remote port being used by the peer for the TCP session // supporting the BGP session. RemotePort uint16 `mapstructure:"remote-port" json:"remote-port,omitempty"` + // original -> bgp:bind-interface + // bgp:bind-interface's original type is union. + // Interface name for binding. + BindInterface string `mapstructure:"bind-interface" json:"bind-interface,omitempty"` } // struct for container bgp:config. @@ -2580,6 +2584,10 @@ type TransportConfig struct { // original -> gobgp:ttl // TTL value for BGP packets. Ttl uint8 `mapstructure:"ttl" json:"ttl,omitempty"` + // original -> bgp:bind-interface + // bgp:bind-interface's original type is union. + // Interface name for binding. + BindInterface string `mapstructure:"bind-interface" json:"bind-interface,omitempty"` } func (lhs *TransportConfig) Equal(rhs *TransportConfig) bool { @@ -2604,6 +2612,9 @@ func (lhs *TransportConfig) Equal(rhs *TransportConfig) bool { if lhs.Ttl != rhs.Ttl { return false } + if lhs.BindInterface != rhs.BindInterface { + return false + } return true } -- cgit v1.2.3