summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/handle_arp.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-05-29 00:06:45 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-05-29 23:51:04 +0200
commit33d5f47e781c6986232378b7f8cadd17ac8894fe (patch)
tree3d120cd0d22dfae25dd01a372b1ecfb49ee970e8 /VNFs/DPPD-PROX/handle_arp.c
parent51fd77bfea70da57af93390e1992b16022e2c88f (diff)
VLAN support with vdev devices + few other changes
- vdev devices now support VLAN. - kernel tap device can be configured with a netmask (/24 was always used in previous version). - when sending a (fake) packet to the kernel, this packet will now not be routed by the kernel (i.e. it will leave through the interface configured by PROX). This might change in the futture when PROX supports multiple VLANs per port. But today it prevents ARP being sent on management interfaces. - Log error in case kernel unable to send packet. - Added support for comments (';') in lua sections. - Prevent duplication of local_ipv4 - should now be configured in port section local_ipv4 in core section still supported Change-Id: I8f9a40fe6ad6f3013ff91b58b44627c7f34081e6 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/handle_arp.c')
-rw-r--r--VNFs/DPPD-PROX/handle_arp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/handle_arp.c b/VNFs/DPPD-PROX/handle_arp.c
index 2da98ef2..c0286d42 100644
--- a/VNFs/DPPD-PROX/handle_arp.c
+++ b/VNFs/DPPD-PROX/handle_arp.c
@@ -46,7 +46,7 @@ static void task_update_config(struct task_arp *task)
static void handle_arp(struct task_arp *task, struct ether_hdr_arp *hdr, prox_rte_ether_addr *s_addr)
{
- build_arp_reply(hdr, s_addr);
+ build_arp_reply((prox_rte_ether_hdr *)hdr, s_addr, &hdr->arp);
}
static int handle_arp_bulk(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts)
@@ -61,7 +61,7 @@ static int handle_arp_bulk(struct task_base *tbase, struct rte_mbuf **mbufs, uin
for (uint16_t j = 0; j < n_pkts; ++j) {
hdr = rte_pktmbuf_mtod(mbufs[j], struct ether_hdr_arp *);
if (hdr->ether_hdr.ether_type == ETYPE_ARP) {
- if (arp_is_gratuitous(hdr)) {
+ if (arp_is_gratuitous(&hdr->arp)) {
out[n_other_pkts] = OUT_DISCARD;
n_other_pkts++;
plog_info("Received gratuitous packet \n");
@@ -71,7 +71,7 @@ static int handle_arp_bulk(struct task_base *tbase, struct rte_mbuf **mbufs, uin
out[n_arp_pkts] = task->arp_replies_ring;
n_arp_pkts++;
} else if (task->ip == 0) {
- create_mac(hdr, &s_addr);
+ create_mac(&hdr->arp, &s_addr);
handle_arp(task, hdr, &s_addr);
replies_mbufs[n_arp_reply_pkts] = mbufs[j];
out[n_arp_reply_pkts] = 0;