Skip to content

Commit

Permalink
In rpc_rx.cc, downgrade header magic mismatch from ERPC_ERROR to ERPC…
Browse files Browse the repository at this point in the history
…_INFO
  • Loading branch information
anujkaliaiitd committed Aug 23, 2021
1 parent f3dd524 commit 866ce8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rpc_impl/rpc_rx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ void Rpc<TTr>::process_comps_st() {
auto *pkthdr = reinterpret_cast<pkthdr_t *>(rx_ring_[rx_ring_head_]);
rx_ring_head_ = (rx_ring_head_ + 1) % Transport::kNumRxRingEntries;

// XXX: This acts as a stopgap function to filter non-eRPC packets, like
// broadcast/ARP packets.
if (unlikely(!pkthdr->check_magic())) {
// This is very bad, but we can handle it
ERPC_ERROR(
ERPC_INFO(
"Rpc %u: Received %s with invalid magic. Packet headroom = %s. "
"Dropping.\n",
rpc_id_, pkthdr->to_string().c_str(),
Expand Down

0 comments on commit 866ce8c

Please sign in to comment.