]>
git.puffer.fish Git - matthieu/frr.git/commit
Zebra: Build nelink message for RMAC updates
- Function "zfpm_netlink_encode_mac()" builds a netlink message for RMAC updates.
- To build a netlink message for RMAC updates, we use "ndmsg" in rtlink.
- FPM Message structure is:
FPM header -> nlmsg header -> ndmsg fields -> ndmsg attributes
- Netlink message will look like:
{'ndm_type': 0, 'family': 7, '__pad': (), 'header': {'flags': 1281,
'length':64, 'type': 28, 'pid': 0, 'sequence_number': 0}, 'state': 2,
'flags': 22, 'attrs': [('NDA_LLADDR', 'b2:66:eb:b9:5b:d3'),
('NDA_DST', '10.100.0.2'), ('NDA_MASTER', 11), ('NDA_VNI', 1000)],
'ifindex': 18}
- Message details:
nlmsghdr.nlmsg_type = RTM_NEWNEIGH(28) or RTM_DELNEIGH(29)
nlmsghdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE for "add" ,
"NLM_F_REQUEST" for delete.
ndmsg.ndm_family = AF_BRIDGE
ndmsg.ndm_ifindex = vxlan_if (ifindex)
ndmsg.ndm_state = NUD_REACHABLE
ndmsg.ndm_flags |= NTF_SELF | NTF_MASTER | NTF_EXT_LEARNED
Attribute "NDA_LLADDR" for MAC address
Attribute "NDA_DST" for remote vtep ip
Attribute "NDA_MASTER" for bridge interface ifindex.
Attribute "NDA_VNI" for VNI id.
Signed-off-by: Ameya Dharkar <adharkar@vmware.com>