Netdev List
 help / color / mirror / Atom feed
* [RFC][IPSEC]: tunnel mode processing
@ 2006-09-01  0:55 jamal
  2006-09-01  4:07 ` Herbert Xu
  0 siblings, 1 reply; 7+ messages in thread
From: jamal @ 2006-09-01  0:55 UTC (permalink / raw)
  To: David Miller; +Cc: herbert, netdev


At the moment transport mode processing is not dependent on skb->dst
being passed. Tunnel mode derives the ip->id and ttl from it. More like
computes ip->id.

I am trying to generate traffic via pktgen and it would be nice if i
could get the same behavior on tunnel mode as in transport mode. I dont
think it matters what the values of those two fields are.

Would it be reasonable to do a check so that incase a skb->dst doesnt
exist, the inner headers values can be used i.e something along 
xfrm4_tunnel_output()::

----
        top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ?
                0 : (iph->frag_off & htons(IP_DF));
	if (dst) {
		if (!top_iph->frag_off) 
			__ip_select_ident(top_iph, dst->child, 0);
		top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT);
	} else {
		top_iph->id = iph->id;
		top_iph->ttl = iph->ttl;
	}
----

cheers,
jamal


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-01 13:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-01  0:55 [RFC][IPSEC]: tunnel mode processing jamal
2006-09-01  4:07 ` Herbert Xu
2006-09-01 12:17   ` jamal
2006-09-01 12:22     ` Herbert Xu
2006-09-01 12:56       ` jamal
2006-09-01 13:04         ` Herbert Xu
2006-09-01 13:12           ` jamal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox