From 33d5f47e781c6986232378b7f8cadd17ac8894fe Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Fri, 29 May 2020 00:06:45 +0200 Subject: 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 --- VNFs/DPPD-PROX/handle_arp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'VNFs/DPPD-PROX/handle_arp.c') 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; -- cgit 1.2.3-korg