rtnl_neigh.n_family should be set as AF_BRIDGE when we want to add a fdb entry,
but the func build_neigh_msg does not allow dst addr to be put at that time.
Here is the example:
struct rtnl_neigh neigh = rtnl_neigh_alloc();
struct nl_addr mac = nl_addr_build(AF_LLC, eth, ETH_ALEN);
struct nl_addr *dst = nl_addr_build(AF_INET, addr, 4);
rtnl_neigh.n_family should be set as AF_BRIDGE when we want to add a fdb entry, but the func build_neigh_msg does not allow dst addr to be put at that time.
Here is the example: struct rtnl_neigh neigh = rtnl_neigh_alloc(); struct nl_addr mac = nl_addr_build(AF_LLC, eth, ETH_ALEN); struct nl_addr *dst = nl_addr_build(AF_INET, addr, 4);
Then command "bridge fdb show" will print out the fdb entry: 02:68:60:19:6b:a4 dev flannel.1 dst 10.40.252.12 self permanent
Signed-off-by: huangxuesen huangxuesen@kuaishou.com Signed-off-by: wangli09 wangli09@kuaishou.com