f-88: netif: MAC d'IP flottante, règles de routage par source #88
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
6ecac451ee
commit
1aa7f177f9
5 changed files with 110 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ const (
|
|||
RoleRouter byte = 0x02
|
||||
RoleHostGateway byte = 0x03
|
||||
RoleNATGateway byte = 0x04
|
||||
RoleFloatingIP byte = 0x05
|
||||
|
||||
MaxVNI = 1<<24 - 1
|
||||
)
|
||||
|
|
@ -28,6 +29,10 @@ func AnycastMAC(vni int) (net.HardwareAddr, error) {
|
|||
return vniMAC(RoleAnycastGateway, vni)
|
||||
}
|
||||
|
||||
func FloatingIPMAC(public net.IP) (net.HardwareAddr, error) {
|
||||
return HostMAC(RoleFloatingIP, public)
|
||||
}
|
||||
|
||||
func NATGatewayMAC(l3vni int) (net.HardwareAddr, error) {
|
||||
return vniMAC(RoleNATGateway, l3vni)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue