File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -1336,17 +1336,10 @@ static void l2tp_tunnel_del_work(struct work_struct *work)
1336
1336
1337
1337
sock = sk -> sk_socket ;
1338
1338
1339
- /* If the tunnel socket was created by userspace, then go through the
1340
- * inet layer to shut the socket down, and let userspace close it.
1341
- * Otherwise, if we created the socket directly within the kernel, use
1339
+ /* If the tunnel socket was created within the kernel, use
1342
1340
* the sk API to release it here.
1343
- * In either case the tunnel resources are freed in the socket
1344
- * destructor when the tunnel socket goes away.
1345
1341
*/
1346
- if (tunnel -> fd >= 0 ) {
1347
- if (sock )
1348
- inet_shutdown (sock , 2 );
1349
- } else {
1342
+ if (tunnel -> fd < 0 ) {
1350
1343
if (sock ) {
1351
1344
kernel_sock_shutdown (sock , SHUT_RDWR );
1352
1345
sock_release (sock );
You can’t perform that action at this time.
0 commit comments