Re: [RFC PATCH 3/7] ipv4: Support TOU

2016-05-23 Thread Eric Dumazet
On Mon, 2016-05-23 at 15:48 -0700, Tom Herbert wrote: ... > static int > ip_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, > @@ -382,11 +383,36 @@ int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, > struct flowi *fl) > struct rtable *rt; > struct iphdr *iph;

[RFC PATCH 3/7] ipv4: Support TOU

2016-05-23 Thread Tom Herbert
Add tou_encap structure to inet_sock. In transmit path (ip_queue_xmit) check if encapsulation is enabled and call the build header op if it is. Add IP_TOU_ENCAP setsockopt for IPv4 sockets. Signed-off-by: Tom Herbert --- include/net/inet_sock.h | 1 + include/uapi/linux/in.h | 1 + net/ipv4/ip