diff options
author | saravanank <saravanank@vmware.com> | 2019-05-04 15:04:17 +0200 |
---|---|---|
committer | saravanank <saravanank@vmware.com> | 2019-05-15 06:40:50 +0200 |
commit | 5acde1cfbf669f4a099c6663ef21a2ecac7f2a1e (patch) | |
tree | 866279bac2d155f14fc95585d7de34cfd3379f3c /pimd/pim_bsm.h | |
parent | pimd: PIM Msg header includes N bit as defined by RFC (diff) | |
download | frr-5acde1cfbf669f4a099c6663ef21a2ecac7f2a1e.tar.xz frr-5acde1cfbf669f4a099c6663ef21a2ecac7f2a1e.zip |
pimd: PIM Bootstrap packet processing
1. Packet validation as per RFC 5059 Sec 3.1.3
We won't supporting scope zone BSM as of now, they are dropped now.
Order of the check slightly be changed in code for optimization.
if ((DirectlyConnected(BSM.src_ip_address) == FALSE) OR
(we have no Hello state for BSM.src_ip_address)) {
drop the Bootstrap message silently
}
if (BSM.dst_ip_address == ALL-PIM-ROUTERS) {
if (BSM.no_forward_bit == 0) {
if (BSM.src_ip_address != RPF_neighbor(BSM.BSR_ip_address)) {
drop the Bootstrap message silently
}
} else if ((any previous BSM for this scope has been accepted) OR
(more than BS_Period has elapsed since startup)) {
#only accept no-forward BSM if quick refresh on startup
drop the Bootstrap message silently
}
} else if ((Unicast BSM support enabled) AND
(BSM.dst_ip_address is one of my addresses)) {
if ((any previous BSM for this scope has been accepted) OR
(more than BS_Period has elapsed since startup)) {
#the packet was unicast, but this wasn't
#a quick refresh on startup
drop the Bootstrap message silently
}
} else {
drop the Bootstrap message silently
}
2. Nexthop tracking registration for BSR
3. RPF check for BSR Message.
Zebra Lookup based rpf check for new BSR
NHT cache(pnc) based lookup for old BSR
Signed-off-by: Saravanan K <saravanank@vmware.com>
Diffstat (limited to 'pimd/pim_bsm.h')
-rw-r--r-- | pimd/pim_bsm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pimd/pim_bsm.h b/pimd/pim_bsm.h index 65df83d8e..79aa80576 100644 --- a/pimd/pim_bsm.h +++ b/pimd/pim_bsm.h @@ -187,6 +187,11 @@ struct bsmmsg_rpinfo { void pim_bsm_proc_init(struct pim_instance *pim); void pim_bsm_proc_free(struct pim_instance *pim); void pim_bsm_write_config(struct vty *vty, struct interface *ifp); +int pim_bsm_process(struct interface *ifp, + struct ip *ip_hdr, + uint8_t *buf, + uint32_t buf_size, + bool no_fwd); struct bsgrp_node *pim_bsm_get_bsgrp_node(struct bsm_scope *scope, struct prefix *grp); #endif |