lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55E4BCBE.4070900@cumulusnetworks.com>
Date:	Mon, 31 Aug 2015 14:44:46 -0600
From:	David Ahern <dsa@...ulusnetworks.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, shm@...ulusnetworks.com,
	tom@...bertland.com
Subject: Re: [PATCH net-next] net: Remove VRF change to udp_sendmsg

On 8/31/15 1:44 PM, David Miller wrote:
> From: David Ahern <dsa@...ulusnetworks.com>
> Date: Mon, 31 Aug 2015 09:29:40 -0700
>
>> Remove the VRF change in udp_sendmsg to set the source address. The VRF
>> driver already has access to the packet on the TX path via the dst. It
>> can be used to update the source address in the header.
>>
>> Update function based on OVS.
>>
>> Cc: Tom Herbert <tom@...bertland.com>
>> Signed-off-by: David Ahern <dsa@...ulusnetworks.com>
>
> This is worse.
>
> You have the source address in the VRF driver's output routine in
> fl4.saddr, just use it as-is.

The original saddr code in vrf_xmit was just wrong. It should not have 
been there and was a leftover from early development days.

The saddr needs to be set in the dst output function (vrf_output) as I 
did in this patch otherwise the packet hits the tcpdump tap with 
potentially no source address.

>
> You're adding even more route lookups, at least the existing code
> just walks the device address less which is often cheaper than
> a full-blown route lookup.
>

TCP (and connected sockets) do not hit this lookup in vrf_output.

If anything I should be going straight to fib_table_lookup in the VRF 
driver for this new lookup to get the source address. It knows the exact 
table that should be used and hence can avoid the rules walk + local 
table miss which happens using the ip_route_xxxxx functions as well as 
the rth lookup/create which is not needed here.

Opinions before I work on another version?

David
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ