summaryrefslogtreecommitdiffstats
path: root/VNFs/vFW/pipeline
diff options
context:
space:
mode:
authorAnand B Jyoti <anand.b.jyoti@intel.com>2017-07-12 04:25:16 +0530
committerAnand B Jyoti <anand.b.jyoti@intel.com>2017-07-12 07:51:27 +0530
commit726de49600fb35ca00d460cb5e2ec400979a6546 (patch)
tree09250194805799edd990775a76a10158682a02c0 /VNFs/vFW/pipeline
parentb8351286a53658bee2471430aaafac4eb72bdfde (diff)
vFW: Remove TTL decrementing in firewall acting as gateway
JIRA: SAMPLEVNF-51 vFW is not functioning as a router and hence TTL decrement is not required. Remove this TTL decrementing in vFW. Change-Id: I49ae9b19a473eec0b8072f8a556dca299d89ef74 Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
Diffstat (limited to 'VNFs/vFW/pipeline')
-rw-r--r--VNFs/vFW/pipeline/pipeline_vfw_be.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/VNFs/vFW/pipeline/pipeline_vfw_be.c b/VNFs/vFW/pipeline/pipeline_vfw_be.c
index 70057b41..7c532ed3 100644
--- a/VNFs/vFW/pipeline/pipeline_vfw_be.c
+++ b/VNFs/vFW/pipeline/pipeline_vfw_be.c
@@ -637,14 +637,6 @@ rte_vfw_ipv4_packet_filter_and_process(struct rte_mbuf **pkts,
vfw_pipe->counters->pkts_drop_fragmented++;
}
- /*
- * Behave like a router, and decrement the TTL of an
- * IP packet. If this causes the TTL to become zero,
- * the packet will be discarded. Unlike a router,
- * no ICMP code 11 (Time * Exceeded) message will be
- * sent back to the packet originator.
- */
-
if (unlikely(ttl <= 1)) {
/*
* about to decrement to zero (or is somehow
@@ -670,18 +662,6 @@ rte_vfw_ipv4_packet_filter_and_process(struct rte_mbuf **pkts,
if (unlikely(discard)) {
valid_packets &= ~pkt_mask;
- } else {
- ihdr4->time_to_live = ttl - 1;
-
- /* update header checksum, from rfc 1141 */
- uint32_t sum;
- uint16_t checksum = rte_bswap16(
- ihdr4->hdr_checksum);
- /* increment checksum high byte */
- sum = checksum + 0x100;
- /* add carry */
- checksum = (sum + (sum >> BIT_CARRY));
- ihdr4->hdr_checksum = rte_bswap16(checksum);
}
/* make next packet data the current */