netlink icon indicating copy to clipboard operation
netlink copied to clipboard

Simulate bridge fdb append

Open kazimsarikaya opened this issue 1 year ago • 0 comments

Hello i am writing a program to simulate this commands (ip addresses and ids are arbitrary):

ip link add vxlan0 type vxlan id 42 dev eth1 dstport 0 
bridge fdb append to 00:00:00:00:00:00 dst 192.168.123.12 dev vxlan0
ip a a dev vxlan0 10.47.252.1/22 
ip l set dev vxlan0 up
ip r add 10.32.4.0/22 via 10.47.252.2

The second line

bridge fdb append to 00:00:00:00:00:00 dst 192.168.123.12 dev vxlan0

is completed by

https://gist.github.com/kazimsarikaya/0a1878bcfa2697d041cf003d3c926864

The main append is at line 67. inside if (disabled by false) I am using netlink.NeighAppend method. At else part I am using bridge command.

Else part works as expected. However if part cannot for. If I enable (I dont know it is correct) AF_BRIDGE it gives Operation not supported.

kazimsarikaya avatar Aug 01 '24 10:08 kazimsarikaya