lkml.org 
[lkml]   [2014]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH net-next] pktgen: add ttl option for pktgen
On Wed, 30 Jul 2014 16:21:26 +0800
Zhouyi Zhou <zhouzhouyi@gmail.com> wrote:

> I think it is useful to add ttl option for pktgen, for example
> if a some ISP want to test its network quality, it could set
> ttl so that the tested links get the packet while end users won't
> get it.

It seems you're missing

--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2799,7 +2799,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,

iph->ihl = 5;
iph->version = 4;
- iph->ttl = 32;
+ iph->ttl = pkt_dev->ttl;
iph->tos = pkt_dev->tos;
iph->protocol = IPPROTO_UDP; /* UDP */
iph->saddr = pkt_dev->cur_saddr;

\
 
 \ /
  Last update: 2014-07-30 13:41    [W:0.045 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site