|
@@ -1469,6 +1469,14 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
|
|
|
goto drop;
|
|
goto drop;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ rcu_read_lock();
|
|
|
|
|
+
|
|
|
|
|
+ if (unlikely(!(vxlan->dev->flags & IFF_UP))) {
|
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
|
+ atomic_long_inc(&vxlan->dev->rx_dropped);
|
|
|
|
|
+ goto drop;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
stats = this_cpu_ptr(vxlan->dev->tstats);
|
|
stats = this_cpu_ptr(vxlan->dev->tstats);
|
|
|
u64_stats_update_begin(&stats->syncp);
|
|
u64_stats_update_begin(&stats->syncp);
|
|
|
stats->rx_packets++;
|
|
stats->rx_packets++;
|
|
@@ -1476,6 +1484,9 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
|
|
|
u64_stats_update_end(&stats->syncp);
|
|
u64_stats_update_end(&stats->syncp);
|
|
|
|
|
|
|
|
gro_cells_receive(&vxlan->gro_cells, skb);
|
|
gro_cells_receive(&vxlan->gro_cells, skb);
|
|
|
|
|
+
|
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
|
+
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
drop:
|
|
drop:
|