mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 22:37:49 +00:00
Merge remote-tracking branch 'origin/cmaster' into cmaster-next
This commit is contained in:
commit
69b5e938fe
@ -5922,7 +5922,7 @@ route_vty_out (struct vty *vty, struct prefix *p,
|
||||
vty_out(vty, "?");
|
||||
}
|
||||
/* IPv4 Next Hop */
|
||||
else if (p->family == AF_INET || !BGP_ATTR_NEXTHOP_AFI_IP6(attr))
|
||||
else if (p->family == AF_INET && !BGP_ATTR_NEXTHOP_AFI_IP6(attr))
|
||||
{
|
||||
if (json_paths)
|
||||
{
|
||||
|
@ -11068,8 +11068,6 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
|
||||
{
|
||||
json_addr = json_object_new_object();
|
||||
json_af = json_object_new_object();
|
||||
json_prefA = json_object_new_object();
|
||||
json_prefB = json_object_new_object();
|
||||
filter = &p->filter[afi][safi];
|
||||
|
||||
if (peer_group_active(p))
|
||||
@ -11089,6 +11087,7 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
|
||||
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_RCV))
|
||||
{
|
||||
json_object_int_add(json_af, "orfType", ORF_TYPE_PREFIX);
|
||||
json_prefA = json_object_new_object();
|
||||
bgp_show_peer_afi_orf_cap (vty, p, afi, safi,
|
||||
PEER_CAP_ORF_PREFIX_SM_ADV,
|
||||
PEER_CAP_ORF_PREFIX_RM_ADV,
|
||||
@ -11103,6 +11102,7 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
|
||||
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_OLD_RCV))
|
||||
{
|
||||
json_object_int_add(json_af, "orfOldType", ORF_TYPE_PREFIX_OLD);
|
||||
json_prefB = json_object_new_object();
|
||||
bgp_show_peer_afi_orf_cap (vty, p, afi, safi,
|
||||
PEER_CAP_ORF_PREFIX_SM_ADV,
|
||||
PEER_CAP_ORF_PREFIX_RM_ADV,
|
||||
@ -11118,6 +11118,8 @@ bgp_show_peer_afi (struct vty *vty, struct peer *p, afi_t afi, safi_t safi,
|
||||
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_RCV)
|
||||
|| CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ORF_PREFIX_RM_OLD_RCV))
|
||||
json_object_object_add(json_addr, "afDependentCap", json_af);
|
||||
else
|
||||
json_object_free(json_af);
|
||||
|
||||
sprintf (orf_pfx_name, "%s.%d.%d", p->host, afi, safi);
|
||||
orf_pfx_count = prefix_bgp_show_prefix_list (NULL, afi, orf_pfx_name, use_json);
|
||||
@ -11840,6 +11842,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
|
||||
CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_RX_ADV) ||
|
||||
CHECK_FLAG (p->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_RX_RCV))
|
||||
json_object_object_add(json_add, print_store, json_sub);
|
||||
else
|
||||
json_object_free(json_sub);
|
||||
}
|
||||
|
||||
json_object_object_add(json_cap, "addPath", json_add);
|
||||
@ -11864,7 +11868,6 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
|
||||
json_object *json_nxt = NULL;
|
||||
const char *print_store;
|
||||
|
||||
json_nxt = json_object_new_object();
|
||||
|
||||
if (CHECK_FLAG (p->cap, PEER_CAP_ENHE_ADV) && CHECK_FLAG (p->cap, PEER_CAP_ENHE_RCV))
|
||||
json_object_string_add(json_cap, "extendedNexthop", "advertisedAndReceived");
|
||||
@ -11875,6 +11878,8 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
|
||||
|
||||
if (CHECK_FLAG (p->cap, PEER_CAP_ENHE_RCV))
|
||||
{
|
||||
json_nxt = json_object_new_object();
|
||||
|
||||
for (safi = SAFI_UNICAST ; safi < SAFI_MAX ; safi++)
|
||||
{
|
||||
if (CHECK_FLAG (p->af_cap[AFI_IP][safi], PEER_CAP_ENHE_AF_RCV))
|
||||
@ -11972,7 +11977,10 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
|
||||
}
|
||||
}
|
||||
if (! restart_af_count)
|
||||
{
|
||||
json_object_string_add(json_cap, "addressFamiliesByPeer", "none");
|
||||
json_object_free(json_restart);
|
||||
}
|
||||
else
|
||||
json_object_object_add(json_cap, "addressFamiliesByPeer", json_restart);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
##
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
AC_INIT(Quagga, 0.99.24+cl3u3, [https://bugzilla.quagga.net])
|
||||
AC_INIT(Quagga, 0.99.24+cl3u4, [https://bugzilla.quagga.net])
|
||||
CONFIG_ARGS="$*"
|
||||
AC_SUBST(CONFIG_ARGS)
|
||||
AC_CONFIG_SRCDIR(lib/zebra.h)
|
||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
quagga (0.99.24+cl3u4) RELEASED; urgency=medium
|
||||
|
||||
* Closes: CM-12687 - Buffer overflow in zebra RA code
|
||||
|
||||
-- dev-support <dev-support@cumulusnetworks.com> Wed, 31 Aug 2016 12:36:10 -0400
|
||||
|
||||
quagga (0.99.24+cl3u3) RELEASED; urgency=medium
|
||||
|
||||
* New Enabled: Merge up-to 0.99.24 code from upstream
|
||||
|
32
lib/plist.c
32
lib/plist.c
@ -899,7 +899,7 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
|
||||
struct prefix_list *plist;
|
||||
struct prefix_list_entry *pentry;
|
||||
struct prefix_list_entry *dup;
|
||||
struct prefix p;
|
||||
struct prefix p, p_tmp;
|
||||
int any = 0;
|
||||
int seqnum = -1;
|
||||
int lenum = 0;
|
||||
@ -945,6 +945,11 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
|
||||
vty_out (vty, "%% Malformed IPv4 prefix%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
/* make a copy to verify prefix matches mask length */
|
||||
prefix_copy (&p_tmp, &p);
|
||||
apply_mask_ipv4 ((struct prefix_ipv4 *) &p_tmp);
|
||||
|
||||
break;
|
||||
case AFI_IP6:
|
||||
if (strncmp ("any", prefix, strlen (prefix)) == 0)
|
||||
@ -962,6 +967,11 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
|
||||
vty_out (vty, "%% Malformed IPv6 prefix%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
/* make a copy to verify prefix matches mask length */
|
||||
prefix_copy (&p_tmp, &p);
|
||||
apply_mask_ipv6 ((struct prefix_ipv6 *) &p_tmp);
|
||||
|
||||
break;
|
||||
case AFI_ETHER:
|
||||
default:
|
||||
@ -970,6 +980,18 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
|
||||
break;
|
||||
}
|
||||
|
||||
/* If prefix has bits not under the mask, adjust it to fit */
|
||||
if (!prefix_same (&p_tmp, &p))
|
||||
{
|
||||
char buf[PREFIX2STR_BUFFER];
|
||||
char buf_tmp[PREFIX2STR_BUFFER];
|
||||
prefix2str(&p, buf, sizeof(buf));
|
||||
prefix2str(&p_tmp, buf_tmp, sizeof(buf_tmp));
|
||||
zlog_warn ("Prefix-list %s prefix changed from %s to %s to match length",
|
||||
name, buf, buf_tmp);
|
||||
p = p_tmp;
|
||||
}
|
||||
|
||||
/* ge and le check. */
|
||||
if (genum && (genum <= p.prefixlen))
|
||||
return vty_invalid_prefix_range (vty, prefix);
|
||||
@ -995,14 +1017,6 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name,
|
||||
if (dup)
|
||||
{
|
||||
prefix_list_entry_free (pentry);
|
||||
vty_out (vty, "%% Insertion failed - prefix-list entry exists:%s",
|
||||
VTY_NEWLINE);
|
||||
vty_out (vty, " seq %u %s %s", dup->seq, typestr, prefix);
|
||||
if (! any && genum)
|
||||
vty_out (vty, " ge %d", genum);
|
||||
if (! any && lenum)
|
||||
vty_out (vty, " le %d", lenum);
|
||||
vty_out (vty, "%s", VTY_NEWLINE);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user