Skip to content

Pass keys down to ip_queue_xmit()

David Miller netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15dccp: Use cork flow in dccp_v4_connect()net/dccp/ipv4.c+6 -50 replies
2/15tcp: Use cork flow in tcp_v4_connect()net/ipv4/tcp_ipv4.c+7 -60 replies
3/15l2tp: Fix locking in l2tp_ip.cnet/l2tp/l2tp_ip.c+15 -40 replies
4/15l2tp: Fix locking in l2tp_core.cnet/l2tp/l2tp_core.c+8 -00 replies
5/15l2tp: Use cork flow in l2tp_ip_connect() and l2tp_ip_sendmsg()net/l2tp/l2tp_ip.c+9 -70 replies
6/15ipv4: Lock socket and use cork flow in ip4_datagram_connect().net/ipv4/datagram.c+15 -80 replies
7/15ipv4: Use cork flow in inet_sk_{reselect_saddr,rebuild_header}()net/ipv4/af_inet.c+7 -50 replies
8/15ipv4: Use cork flow in ip_queue_xmit()net/ipv4/ip_output.c+3 -20 replies
9/15sctp: Store a flowi in transports to provide persistent keying.include/net/sctp/structs.h net/sctp/transport.c+4 -60 replies
10/15ipv4: Create inet_csk_route_child_sock().include/net/inet_connection_sock.h net/ipv4/inet_connection_sock.c+36 -00 replies
11/15ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.net/dccp/ipv4.c net/ipv4/tcp_ipv4.c+20 -170 replies
12/15inet: Pass flowi to ->queue_xmit().include/net/inet6_connection_sock.h include/net/inet_connection_sock.h include/net/ip.h +7 more+17 -150 replies
13/15ipv4: Don't use rt->rt_{src,dst} in ip_queue_xmit().net/ipv4/ip_output.c+4 -40 replies
14/15sctp: Don't use rt->rt_{src,dst} in sctp_v4_xmit()net/sctp/protocol.c+2 -20 replies
15/15tcp: Use cork flow info instead of rt->rt_dst in tcp_v4_get_peer()net/ipv4/tcp_ipv4.c+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/15] Pass keys down to ip_queue_xmit()

The final goal of this set of changes is to normalize all uses of ip_queue_xmit() and how sockets are connected up so that ip_queue_xmit() can elide it's usage of rt->rt_{src,dst}

Along the way I found some locking problems in L2TP fixed here.

Basically we reuse inet_sk->cork.fl to store keying information and pass that (or something more appropriate) to ip_queue_xmit()

This opens up the door for SCTP to express exactly what is does, by passing in a flow which is now added to the individual transport instances.

Taking this one step further, we could add a "struct dst **dst" argument to ->queue_xmit() and friends, then SCTP could pass in "&transport->dst" and it would no longer need to do that special "pre-hookup the DST to skb" uglyness.

L2TP could be modified similarly.

Then the pre-routed SKB code can be removed completely.