Skip to content

Commit 2baecda

Browse files
TaeheeYoodavem330
authored andcommitted
bareudp: remove unnecessary udp_encap_enable() in bareudp_socket_create()
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c46a49a commit 2baecda

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/net/bareudp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@ static int bareudp_socket_create(struct bareudp_dev *bareudp, __be16 port)
250250
tunnel_cfg.encap_destroy = NULL;
251251
setup_udp_tunnel_sock(bareudp->net, sock, &tunnel_cfg);
252252

253-
if (sock->sk->sk_family == AF_INET6)
254-
udp_encap_enable();
255-
256253
rcu_assign_pointer(bareudp->sock, sock);
257254
return 0;
258255
}

0 commit comments

Comments
 (0)