[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878vavshhp.fsf@xmission.com>
Date: Wed, 24 Oct 2012 14:11:14 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: rsa <ravi.mlists@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: switching network namespace midway
rsa <ravi.mlists@...il.com> writes:
> Assuming I have a tunnel interface where two route lookups are done --
> one for innter
> packet and the other for outer -- do you see any issues in switching
> the network
> namespace prior to second route lookup (and restore to the original namespace
> after the second lookup is done)?
>
> If so, are there any other calls other than sk_change_net() needed?
In general sk_change_net is a bad idea.
Most likely what you want to do is simply memorize both struct net's
that you care about and perform the routing lookup as appropriate.
Certainly you don't want to be calling sk_change_net for every packet
that goes through your tunnel.
Eric
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists