]> git.baikalelectronics.ru Git - kernel.git/commit
New kernel function to get IP overhead on a socket.
authorR. Parameswaran <parameswaran.r7@gmail.com>
Wed, 5 Apr 2017 23:50:35 +0000 (16:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 20:43:31 +0000 (13:43 -0700)
commite5b672821c3a0aa430fdb852198fd1e2cc821cea
treea0f7e868672699b451a5053824eea0df16ce07cc
parent9ec71e72c313f9e091c54681e0867ec06e3e6534
New kernel function to get IP overhead on a socket.

A new function, kernel_sock_ip_overhead(), is provided
to calculate the cumulative overhead imposed by the IP
Header and IP options, if any, on a socket's payload.
The new function returns an overhead of zero for sockets
that do not belong to the IPv4 or IPv6 address families.
This is used in the L2TP code path to compute the
total outer IP overhead on the L2TP tunnel socket when
calculating the default MTU for Ethernet pseudowires.

Signed-off-by: R. Parameswaran <rparames@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/net.h
net/socket.c