mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ip-tunnel: Use API to access tunnel metadata options.
Currently tun-info options pointer is used in few cases to pass options around. But tunnel options can be accessed using ip_tunnel_info_opts() API without using the pointer. Following patch removes the redundant pointer and consistently make use of API. Signed-off-by: Pravin B Shelar <[email protected]> Acked-by: Thomas Graf <[email protected]> Reviewed-by: Jesse Gross <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d1bfc62591
commit
4c22279848
16 changed files with 100 additions and 112 deletions
|
|
@ -249,7 +249,6 @@ static int ip_tun_build_state(struct net_device *dev, struct nlattr *attr,
|
|||
tun_info->key.tun_flags = nla_get_u16(tb[LWTUNNEL_IP_FLAGS]);
|
||||
|
||||
tun_info->mode = IP_TUNNEL_INFO_TX;
|
||||
tun_info->options = NULL;
|
||||
tun_info->options_len = 0;
|
||||
|
||||
*ts = new_state;
|
||||
|
|
@ -357,7 +356,6 @@ static int ip6_tun_build_state(struct net_device *dev, struct nlattr *attr,
|
|||
tun_info->key.tun_flags = nla_get_u16(tb[LWTUNNEL_IP6_FLAGS]);
|
||||
|
||||
tun_info->mode = IP_TUNNEL_INFO_TX | IP_TUNNEL_INFO_IPV6;
|
||||
tun_info->options = NULL;
|
||||
tun_info->options_len = 0;
|
||||
|
||||
*ts = new_state;
|
||||
|
|
|
|||
Loading…
Reference in a new issue