|
@@ -1519,10 +1519,10 @@ static void __fanout_unlink(struct sock *sk, struct packet_sock *po)
|
|
|
|
|
|
static bool match_fanout_group(struct packet_type *ptype, struct sock *sk)
|
|
static bool match_fanout_group(struct packet_type *ptype, struct sock *sk)
|
|
{
|
|
{
|
|
- if (ptype->af_packet_priv == (void *)((struct packet_sock *)sk)->fanout)
|
|
|
|
- return true;
|
|
|
|
|
|
+ if (sk->sk_family != PF_PACKET)
|
|
|
|
+ return false;
|
|
|
|
|
|
- return false;
|
|
|
|
|
|
+ return ptype->af_packet_priv == pkt_sk(sk)->fanout;
|
|
}
|
|
}
|
|
|
|
|
|
static void fanout_init_data(struct packet_fanout *f)
|
|
static void fanout_init_data(struct packet_fanout *f)
|