[NETLINK]: Encapsulate eff_cap usage within security framework.
[firefly-linux-kernel-4.4.55.git] / net / decnet / netfilter / dn_rtmsg.c
index 74133ecd77005e4292485c557d97e39a7f12424b..8b99bd33540d53fc072278aa6ade21906a541f90 100644 (file)
@@ -107,7 +107,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
        if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
                return;
 
-       if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN))
+       if (security_netlink_recv(skb, CAP_NET_ADMIN))
                RCV_SKB_FAIL(-EPERM);
 
        /* Eventually we might send routing messages too */