Skip to content

Commit

Permalink
bareudp: remove unnecessary udp_encap_enable() in bareudp_socket_crea…
Browse files Browse the repository at this point in the history
…te()

In the current code, udp_encap_enable() is called in
bareudp_socket_create().
But, setup_udp_tunnel_sock() internally calls udp_encap_enable().
So, udp_encap_enable() is unnecessary.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Taehee Yoo authored and David S. Miller committed Mar 9, 2020
1 parent c46a49a commit 2baecda
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/bareudp.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,6 @@ static int bareudp_socket_create(struct bareudp_dev *bareudp, __be16 port)
tunnel_cfg.encap_destroy = NULL;
setup_udp_tunnel_sock(bareudp->net, sock, &tunnel_cfg);

if (sock->sk->sk_family == AF_INET6)
udp_encap_enable();

rcu_assign_pointer(bareudp->sock, sock);
return 0;
}
Expand Down

0 comments on commit 2baecda

Please sign in to comment.