[CRIU] [PATCH] net: Do not BUG() if unsupported link type met

Cyrill Gorcunov gorcunov at openvz.org
Mon Feb 11 04:15:01 EST 2013


But rather exit gracefully.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 net.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net.c b/net.c
index 03c168f..444f78e 100644
--- a/net.c
+++ b/net.c
@@ -243,9 +243,11 @@ static int restore_link(NetDeviceEntry *nde, int nlsk)
 		return restore_one_link(nde, nlsk, NULL);
 	case ND_TYPE__VETH:
 		return restore_one_link(nde, nlsk, veth_link_info);
+	default:
+		pr_err("Unsupported link type %d\n", nde->type);
+		break;
 	}
 
-	BUG();
 	return -1;
 }
 
-- 
1.8.1.2



More information about the CRIU mailing list