Commit b48bc137 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

net/cap: fix panic in rtcap_signal_handler()

parent f083112f
......@@ -195,11 +195,13 @@ static void rtcap_signal_handler(rtdm_nrtsig_t *nrtsig, void *arg)
ifindex = rtskb->rtdev->ifindex;
active = tap_device[ifindex].present;
if ((tap_device[ifindex].tap_dev->flags & IFF_UP) == 0)
active &= ~TAP_DEV;
if (active & RTMAC_TAP_DEV &&
!(tap_device[ifindex].rtmac_tap_dev->flags & IFF_UP))
active &= ~RTMAC_TAP_DEV;
if (active) {
if ((tap_device[ifindex].tap_dev->flags & IFF_UP) == 0)
active &= ~TAP_DEV;
if (active & RTMAC_TAP_DEV &&
!(tap_device[ifindex].rtmac_tap_dev->flags & IFF_UP))
active &= ~RTMAC_TAP_DEV;
}
if (active == 0) {
tap_device[ifindex].tap_dev_stats.rx_dropped++;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment