You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1886 if let ImportExportPolicy::Allow(ref policy) =
1887 lock!(self.session).allow_export
1888 {
1889 let message_policy = policy
1890 .iter()
1891 .filter_map(|x| match x {
1892 rdb::Prefix::V4(x) => Some(x),
1893 _ => None,
1894 })
1895 .map(|x| crate::messages::Prefix::from(*x))
1896 .collect::<BTreeSet<crate::messages::Prefix>>();
1897
1898 update.nlri.retain(|x| message_policy.contains(x));
1899 update.withdrawn.retain(|x| message_policy.contains(x));
1900 };
bgp/src/session.rs
Line 1899 is only retaining routes in the withdrawn nlri list that pass the export policy.
This means that reconfiguring the export policy will not result in previously-allowed routes getting withdrawn.
The text was updated successfully, but these errors were encountered:
Import/Export filters are meant to modify which advertised prefixes
are allowed. For Import, this is simply an allow-list that accepts a
subset of the advertised nlri in a received update. For Export, this
is an allow-list that accepts a subset of the locally originated nlri.
In neither case do you want to apply these filters to the list of
withdrawn nlri, as this can result in stale routes if a legitimate
withdrawal is not sent or received.
Fixes: #330
Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
Import/Export filters are meant to modify which advertised prefixes
are allowed. For Import, this is simply an allow-list that accepts a
subset of the advertised nlri in a received update. For Export, this
is an allow-list that accepts a subset of the locally originated nlri.
In neither case do you want to apply these filters to the list of
withdrawn nlri, as this can result in stale routes if a legitimate
withdrawal is not sent or received.
Fixes: #330
Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
bgp/src/session.rs
Line 1899 is only retaining routes in the withdrawn nlri list that pass the export policy.
This means that reconfiguring the export policy will not result in previously-allowed routes getting withdrawn.
The text was updated successfully, but these errors were encountered: