]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Keep the interface flags safe on multiple ioctl calls
authorBijan <bijanebrahimi@riseup.net>
Tue, 1 Feb 2022 07:33:00 +0000 (11:03 +0330)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 5 Jul 2022 17:43:53 +0000 (14:43 -0300)
commit5362aa8ce565554973b282e47084e8b3cacabadb
tree95b7a9e0c46079ef8b8c593091cd2d75025413d8
parentcc1c5828d42a2aefb3cced0a71dd32da906c459f
zebra: Keep the interface flags safe on multiple ioctl calls

Trying to call multiple ioctl calls on ifreq will result in
overwriting ifreq with garbage data. On if_get_flags call,
try to keep the flags field safe from another possible ioctl
call before applying the flags field.

Modified code as per Code Review, done by Donald Sharp.

Signed-off-by: Bijan <bijanebrahimi@riseup.net>
(cherry picked from commit 16dca7cec5f47b7a6f83822a1e681652b7d2d60d)
zebra/ioctl.c