Check netlink file descriptor only if receive IEEE 802.11 packets in usermode.

This commit is contained in:
vemax78
2014-06-14 14:52:02 +02:00
parent c3865e4cbb
commit 2d6c4c4dd8
3 changed files with 59 additions and 35 deletions

View File

@ -264,7 +264,9 @@ static int nlsmartcapwap_join_mac80211_device(struct sk_buff* skb, struct genl_i
}
/* */
nldev->usermodeid = genl_info_snd_portid(info);
if (nldev->flags & SMARTCAPWAP_FLAGS_SEND_USERSPACE) {
nldev->usermodeid = genl_info_snd_portid(info);
}
/* Connect device to mac80211 */
ret = ieee80211_pcktunnel_register(ifindex, &nldev->pcktunnel_handler);