mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 15:06:58 +00:00
lib: assert for VTY_PASSFD expectations
Coverity is complaining that vty->state could be VTY_PASSFD here. It can't, it really shouldn't, and if it actually is then something went seriously wrong somewhere earlier so assert()ing out is the best thing to do. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
1c829fac8e
commit
ee5dd0a081
@ -2386,9 +2386,14 @@ static void vtysh_read(struct event *thread)
|
|||||||
* => skip vty_event(VTYSH_READ, vty)!
|
* => skip vty_event(VTYSH_READ, vty)!
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
} else
|
} else {
|
||||||
|
assertf(vty->status != VTY_PASSFD,
|
||||||
|
"%p address=%s passfd=%d", vty,
|
||||||
|
vty->address, vty->pass_fd);
|
||||||
|
|
||||||
/* normalize other invalid values */
|
/* normalize other invalid values */
|
||||||
vty->pass_fd = -1;
|
vty->pass_fd = -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* hack for asynchronous "write integrated"
|
/* hack for asynchronous "write integrated"
|
||||||
* - other commands in "buf" will be ditched
|
* - other commands in "buf" will be ditched
|
||||||
|
Loading…
Reference in New Issue
Block a user