[CRIU] [PATCH] net: Dump venet links

Pavel Emelyanov xemul at parallels.com
Tue Sep 17 14:31:05 EDT 2013


On 09/17/2013 09:59 PM, Cyrill Gorcunov wrote:
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> 
> Please apply it after previous set, since ND_TYPE__VENET
> required.
> 
>  net.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/net.c b/net.c
> index c596a09..3c49650 100644
> --- a/net.c
> +++ b/net.c
> @@ -170,6 +170,13 @@ static int dump_one_link(struct nlmsghdr *hdr, void *arg)
>  	case ARPHRD_NONE:
>  		ret = dump_one_gendev(ifi, tb, fds);
>  		break;
> +	case ARPHRD_VOID:
> +		if (tb[IFLA_IFNAME] &&
> +		    !strncmp(RTA_DATA(tb[IFLA_IFNAME]), "venet", 5)) {

Name can be changed for network device, thus it's a bad classifier.

> +			ret = dump_one_netdev(ND_TYPE__VENET, ifi, tb, fds, NULL);
> +			break;
> +		}
> +		/* Fall through otherwise! */
>  	default:
>  		pr_err("Unsupported link type %d, kind %s\n",
>  				ifi->ifi_type, link_kind(ifi, tb));
> 




More information about the CRIU mailing list