mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 20:34:33 +00:00
pbrd: fix crash with match command
Crash with empty `ip-protocol`: ``` anlan(config-pbr-map)# match ip-protocol vtysh: error reading from pbrd: Resource temporarily unavailable (11)Warning: closing connection to pbrd because of an I/O error! ``` So, give warning for empty `ip-protocol`. Signed-off-by: anlan_cs <vic.lan@pica8.com>
This commit is contained in:
parent
4199f032e5
commit
4e313ee450
@ -199,6 +199,11 @@ DEFPY(pbr_map_match_ip_proto, pbr_map_match_ip_proto_cmd,
|
|||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
|
||||||
if (!no) {
|
if (!no) {
|
||||||
|
if (!ip_proto) {
|
||||||
|
vty_out(vty, "Unable to convert (null) to proto id\n");
|
||||||
|
return CMD_WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
p = getprotobyname(ip_proto);
|
p = getprotobyname(ip_proto);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
vty_out(vty, "Unable to convert %s to proto id\n",
|
vty_out(vty, "Unable to convert %s to proto id\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user