Squashed commit of the following:
commit
4d417498e15e097d5f1b7cdcfe8dca253784a5f5
Author: Raman Krishnan <ramanks@cisco.com>
Date: Mon Oct 11 22:53:34 2021 -0700
codec: geneve: injected packets should have geneve port in outer udp header
const udp::UDPHdr* const hi = reinterpret_cast<const udp::UDPHdr*>(raw_in);
udp::UDPHdr* const udph_out = reinterpret_cast<udp::UDPHdr*>(buf.data());
- if ( enc.forward() )
+ // irrespective of direction, for geneve, don't swap the ports
+ if ( enc.forward() || config->is_geneve_port(ntohs(hi->uh_dport)) )
{
udph_out->uh_sport = hi->uh_sport;
udph_out->uh_dport = hi->uh_dport;