Skip to content

Commit

Permalink
Merge pull request #817 from ywc689/bugfix
Browse files Browse the repository at this point in the history
sent rst to both ends when snat session expires
  • Loading branch information
ywc689 authored Jul 14, 2022
2 parents ebec3f3 + aa08810 commit b42c3a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ CFLAGS += -D CONFIG_DPVS_LOG
#CFLAGS += -D CONFIG_MSG_DEBUG
#CFLAGS += -D CONFIG_DPVS_MP_DEBUG
#CFLAGS += -D CONFIG_DPVS_NETIF_DEBUG
#CFLAGS += -D CONFIG_DPVS_ICMP_DEBUG

# for ixgbe nic
ifeq ($(CONFIG_IXGEB_PMD), y)
Expand Down
2 changes: 1 addition & 1 deletion src/ipv6/icmp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static void icmp6_dump_hdr(const struct rte_mbuf *mbuf)
lcoreid_t lcore = rte_lcore_id();

fprintf(stderr, "lcore %d port %d icmp type %u code %u\n",
lcore, mbuf->port, ich->icmp_type, ich->icmp_code);
lcore, mbuf->port, ich->icmp6_type, ich->icmp6_code);

return;
}
Expand Down
5 changes: 3 additions & 2 deletions src/ipvs/ip_vs_proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1145,8 +1145,9 @@ static int tcp_conn_expire(struct dp_vs_proto *proto,
int err;
assert(proto && conn && conn->dest);

if (conn->dest->fwdmode == DPVS_FWD_MODE_NAT
|| conn->dest->fwdmode == DPVS_FWD_MODE_FNAT) {
if (conn->dest->fwdmode == DPVS_FWD_MODE_FNAT
|| conn->dest->fwdmode == DPVS_FWD_MODE_SNAT
|| conn->dest->fwdmode == DPVS_FWD_MODE_NAT) {
/* send RST to RS and client */
err = tcp_send_rst(proto, conn, DPVS_CONN_DIR_INBOUND);
if (err != EDPVS_OK)
Expand Down

0 comments on commit b42c3a2

Please sign in to comment.