diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/receive.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/receive.c b/src/receive.c index 6efbc08..0f896ee 100644 --- a/src/receive.c +++ b/src/receive.c @@ -407,10 +407,8 @@ void packet_decrypt_worker(struct work_struct *work) struct sk_buff *skb; while ((skb = ptr_ring_consume_bh(&queue->ring)) != NULL) { - if (likely(skb_decrypt(skb, &PACKET_CB(skb)->keypair->receiving))) - queue_enqueue_per_peer(&PACKET_PEER(skb)->rx_queue, skb, PACKET_STATE_CRYPTED); - else - queue_enqueue_per_peer(&PACKET_PEER(skb)->rx_queue, skb, PACKET_STATE_DEAD); + enum packet_state state = likely(skb_decrypt(skb, &PACKET_CB(skb)->keypair->receiving)) ? PACKET_STATE_CRYPTED : PACKET_STATE_DEAD; + queue_enqueue_per_peer(&PACKET_PEER(skb)->rx_queue, skb, state); } } |