Subject: Re: [PATCH 13/13] TProxy: use the interface primary IP address as a default value for --on-ip

From: Brian Haley <[email-masked]>
Date: Mon, 28 Sep 2009 12:16:10 -0400

Balazs Scheidler wrote:
> One question, how fast is ipv6_dev_get_saddr()? Since the TPROXY target
> can execute on a per-packet path (although the socket match should take
> care of packets that belong to already-established connections), this
> may be performance critical. Is ipv6_dev_get_saddr() something that I
> can call so often?

It probably isn't the best thing to be calling on a per-packet basis, it's
mainly called now on a per-connection basis.  I guess if it's really bad
for you we could do something like ipv6_get_lladdr() does for finding
a link-local address, it might be good enough in this case.

-Brian