summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_packet.c10
-rw-r--r--doc/user/bgp.rst9
-rw-r--r--tests/topotests/lib/snmptest.py13
3 files changed, 25 insertions, 7 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 78554893ff..9c194eac1c 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -3734,7 +3734,10 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt,
zlog_err("%pBP: Capability length error", peer);
bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE,
BGP_NOTIFY_SUBCODE_UNSPECIFIC);
- pnt += length;
+ /*
+ * If we did not return then
+ * pnt += length;
+ */
return BGP_Stop;
}
action = *pnt;
@@ -3759,7 +3762,10 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt,
zlog_err("%pBP: Capability length error", peer);
bgp_notify_send(peer->connection, BGP_NOTIFY_CEASE,
BGP_NOTIFY_SUBCODE_UNSPECIFIC);
- pnt += length;
+ /*
+ * If we did not return then
+ * pnt += length;
+ */
return BGP_Stop;
}
diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst
index 68ae796bc9..878473cd77 100644
--- a/doc/user/bgp.rst
+++ b/doc/user/bgp.rst
@@ -1334,7 +1334,14 @@ OSPFv3 into ``address-family ipv4 unicast`` as OSPFv3 supports IPv6.
.. clicmd:: redistribute <babel|connected|eigrp|isis|kernel|openfabric|ospf|ospf6|rip|ripng|sharp|static> [metric (0-4294967295)] [route-map WORD]
-Redistribute routes from other protocols into BGP.
+ Redistribute routes from other protocols into BGP.
+
+ Note - When redistributing a static route, or any better Admin Distance route,
+ into BGP for which the same path is learned dynamically from another BGP
+ speaker, if the redistribute path is more preferred from a BGP Best Path
+ standpoint than the dynamically learned path, then BGP will not export
+ the best path to Zebra(RIB) for installation into the routing table,
+ unless BGP receives the path before the static route is created.
.. clicmd:: redistribute <table|table-direct> (1-65535)] [metric (0-4294967295)] [route-map WORD]
diff --git a/tests/topotests/lib/snmptest.py b/tests/topotests/lib/snmptest.py
index 814813f7f4..8e2e76d154 100644
--- a/tests/topotests/lib/snmptest.py
+++ b/tests/topotests/lib/snmptest.py
@@ -85,15 +85,18 @@ class SnmpTester(object):
return out_dict, out_list
def get(self, oid):
- cmd = "snmpget {0} {1}".format(self._snmp_config(), oid)
-
+ cmd = "snmpget {0} {1} 2>&1 | grep -v SNMPv2-PDU".format(
+ self._snmp_config(), oid
+ )
result = self.router.cmd(cmd)
if "not found" in result:
return None
return self._get_snmp_value(result)
def get_next(self, oid):
- cmd = "snmpgetnext {0} {1}".format(self._snmp_config(), oid)
+ cmd = "snmpgetnext {0} {1} 2>&1 | grep -v SNMPv2-PDU".format(
+ self._snmp_config(), oid
+ )
result = self.router.cmd(cmd)
print("get_next: {}".format(result))
@@ -102,7 +105,9 @@ class SnmpTester(object):
return self._get_snmp_value(result)
def walk(self, oid):
- cmd = "snmpwalk {0} {1}".format(self._snmp_config(), oid)
+ cmd = "snmpwalk {0} {1} 2>&1 | grep -v SNMPv2-PDU".format(
+ self._snmp_config(), oid
+ )
result = self.router.cmd(cmd)
return self._parse_multiline(result)