mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-01 19:51:11 +00:00
ospf6d: fix decimal area ID cli
Not all numbers are dotted quads Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
56b6674bc0
commit
a27cb3cfe9
@ -406,26 +406,11 @@ ospf6_area_show (struct vty *vty, struct ospf6_area *oa)
|
||||
}
|
||||
|
||||
|
||||
#define OSPF6_CMD_AREA_LOOKUP(str, oa) \
|
||||
{ \
|
||||
u_int32_t area_id = 0; \
|
||||
if (inet_pton (AF_INET, str, &area_id) != 1) \
|
||||
{ \
|
||||
vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \
|
||||
return CMD_SUCCESS; \
|
||||
} \
|
||||
oa = ospf6_area_lookup (area_id, ospf6); \
|
||||
if (oa == NULL) \
|
||||
{ \
|
||||
vty_out (vty, "No such Area: %s%s", str, VNL); \
|
||||
return CMD_SUCCESS; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define OSPF6_CMD_AREA_GET(str, oa) \
|
||||
{ \
|
||||
u_int32_t area_id = 0; \
|
||||
if (inet_pton (AF_INET, str, &area_id) != 1) \
|
||||
char *ep; \
|
||||
u_int32_t area_id = htonl (strtol(str, &ep, 10)); \
|
||||
if (*ep && inet_pton (AF_INET, str, &area_id) != 1) \
|
||||
{ \
|
||||
vty_out (vty, "Malformed Area-ID: %s%s", str, VNL); \
|
||||
return CMD_SUCCESS; \
|
||||
|
Loading…
Reference in New Issue
Block a user