diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2020-05-11 11:26:49 +0200 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2020-05-29 23:38:28 +0200 |
commit | 4359ac786cc49d0ce20f745def415d46fbba177d (patch) | |
tree | 27c1dbc489d1c0edcd64752f3637fbab5051c17b /VNFs/DPPD-PROX/handle_master.c | |
parent | f7148d3d3a0a9dedf24cb4d7a5a72b63c17e6add (diff) |
Fix mbuf leak and stop sending pseudo packet
In addition to a mmbuf leak when receiving netlink routes packets
this commit prevents sending the PROX pseudo packet i.e.
the packet PROX sends to the kernel socket to have it generate
an ARP request.
Change-Id: Iabbdecbe412e4b90ac0df7e30fa36d096c5326f0
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/handle_master.c')
-rw-r--r-- | VNFs/DPPD-PROX/handle_master.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/handle_master.c b/VNFs/DPPD-PROX/handle_master.c index 263f0c8f..ce5c0bc5 100644 --- a/VNFs/DPPD-PROX/handle_master.c +++ b/VNFs/DPPD-PROX/handle_master.c @@ -164,7 +164,7 @@ void master_init_vdev(struct task_base *tbase, uint8_t port_id, uint8_t core_id, struct sockaddr_in dst, src; src.sin_family = AF_INET; src.sin_addr.s_addr = prox_port_cfg[vdev_port].ip; - src.sin_port = rte_cpu_to_be_16(5000); + src.sin_port = rte_cpu_to_be_16(PROX_PSEUDO_PKT_PORT); int fd = socket(AF_INET, SOCK_DGRAM, 0); PROX_PANIC(fd < 0, "Failed to open socket(AF_INET, SOCK_DGRAM, 0)\n"); @@ -498,7 +498,7 @@ static inline void handle_message(struct task_base *tbase, struct rte_mbuf *mbuf struct sockaddr_in dst; dst.sin_family = AF_INET; dst.sin_addr.s_addr = ip; - dst.sin_port = rte_cpu_to_be_16(5000); + dst.sin_port = rte_cpu_to_be_16(PROX_PSEUDO_PKT_PORT); int n = sendto(prox_port_cfg[vdev_port].fd, (char*)(&ip), 0, 0, (struct sockaddr *)&dst, sizeof(struct sockaddr_in)); plogx_dbg("\tSent %d bytes to TAP IP "IPv4_BYTES_FMT" using fd %d\n", n, IPv4_BYTES(((uint8_t*)&ip)), prox_port_cfg[vdev_port].fd); |