mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-02 15:34:30 +00:00
Merge pull request #5620 from qlyoung/fix-zebra-vrf-label-afi-check
Fix zebra vrf label afi check
This commit is contained in:
commit
be3a8fa8f8
@ -360,6 +360,8 @@ typedef enum {
|
||||
AFI_MAX = 4
|
||||
} afi_t;
|
||||
|
||||
#define IS_VALID_AFI(a) ((a) > AFI_UNSPEC && (a) < AFI_MAX)
|
||||
|
||||
/* Subsequent Address Family Identifier. */
|
||||
typedef enum {
|
||||
SAFI_UNSPEC = 0,
|
||||
|
@ -2277,6 +2277,12 @@ static void zread_vrf_label(ZAPI_HANDLER_ARGS)
|
||||
s = msg;
|
||||
STREAM_GETL(s, nlabel);
|
||||
STREAM_GETC(s, afi);
|
||||
|
||||
if (!(IS_VALID_AFI(afi))) {
|
||||
zlog_warn("Invalid AFI for VRF label: %u", afi);
|
||||
return;
|
||||
}
|
||||
|
||||
if (nlabel == zvrf->label[afi]) {
|
||||
/*
|
||||
* Nothing to do here move along
|
||||
|
Loading…
Reference in New Issue
Block a user