bugfix: TSG-7285 在TSG-9140设备上,Proxy解密流量转发封装MAC地址时未使用策略中指定的MAC
This commit is contained in:
@@ -319,16 +319,19 @@ static void tcp_segment_send_to_target_group(struct tfe_stream_addr * addr, stru
|
||||
unsigned int pkt_len = 0;
|
||||
|
||||
/* Ethernet and VLAN header */
|
||||
if (target->vlan_tci > 0)
|
||||
{
|
||||
pkt_len += ether_header_construct(ethdev, pkt_buffer, ether_addr_src,
|
||||
ether_addr_dst, target->vlan_tci, l3_protocol);
|
||||
}
|
||||
else
|
||||
{
|
||||
pkt_len += ether_header_construct(ethdev, pkt_buffer, ether_addr_src,
|
||||
if ((target->rewrite_as_target_mac && target->rewrite_as_target_vlan) ||
|
||||
(target->rewrite_as_target_mac && !target->rewrite_as_target_vlan))
|
||||
{
|
||||
pkt_len += ether_header_construct(ethdev, pkt_buffer, ether_addr_src,
|
||||
&target->ether_addr, target->vlan_tci, l3_protocol);
|
||||
}
|
||||
}
|
||||
// !target->rewrite_as_target_mac && target->rewrite_as_target_vlan
|
||||
// !target->rewrite_as_target_mac && !target->rewrite_as_target_vlan
|
||||
else
|
||||
{
|
||||
pkt_len += ether_header_construct(ethdev, pkt_buffer, ether_addr_src,
|
||||
ether_addr_dst, target->vlan_tci, l3_protocol);
|
||||
}
|
||||
|
||||
/* IPv4/IPv6 Header */
|
||||
pkt_len += ip_header_construct_by_stream_addr(addr,
|
||||
|
||||
Reference in New Issue
Block a user