[08/15] inet: raw -- Add raw sockets into can_dump_inet_sk

Submitted by Cyrill Gorcunov on Sept. 13, 2018, 7:57 p.m.

Details

Message ID 20180913195758.30566-9-gorcunov@gmail.com
State Accepted
Series "net: Add support for raw inet sockets"
Headers show

Commit Message

Cyrill Gorcunov Sept. 13, 2018, 7:57 p.m.
So they would pass this check.

Note because we didn't allow raw socks in can_dump_ipproto
this routine won't be reached and it's safe to modify it this
way without breaking existing tests.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/sk-inet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/sk-inet.c b/criu/sk-inet.c
index 3a5fd8ff4e6f..154d7e6d3f33 100644
--- a/criu/sk-inet.c
+++ b/criu/sk-inet.c
@@ -148,9 +148,9 @@  static int can_dump_inet_sk(const struct inet_sk_desc *sk)
 		return 1;
 	}
 
-	if (sk->type != SOCK_STREAM) {
+	if (sk->type != SOCK_STREAM && sk->type != SOCK_RAW) {
 		pr_err("Can't dump %d inet socket %x. "
-				"Only stream and dgram are supported.\n",
+				"Only stream, dgram and raw are supported.\n",
 				sk->type, sk->sd.ino);
 		return 0;
 	}