inet: raw -- Reserve image members for sockets options

Submitted by Cyrill Gorcunov on Sept. 25, 2018, 4:20 p.m.

Details

Message ID 20180925162005.30426-1-gorcunov@gmail.com
State Accepted
Series "inet: raw -- Reserve image members for sockets options"
Headers show

Commit Message

Cyrill Gorcunov Sept. 25, 2018, 4:20 p.m.
In vz7 we've a slightly different code base where fields
2 and 3 are already used. So lets reserve them and move
raw member to another number.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 images/sk-inet.proto | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/images/sk-inet.proto b/images/sk-inet.proto
index 84306ad5a4b0..75d565dcdd4c 100644
--- a/images/sk-inet.proto
+++ b/images/sk-inet.proto
@@ -13,7 +13,8 @@  message ip_opts_raw_entry {
 
 message ip_opts_entry {
 	optional bool			freebind	= 1;
-	optional ip_opts_raw_entry	raw		= 2;
+	// Fields 2 and 3 are reserved for vz7 use
+	optional ip_opts_raw_entry	raw		= 4;
 }
 
 message inet_sk_entry {

Comments

Andrey Vagin Sept. 26, 2018, 7:57 p.m.
On Tue, Sep 25, 2018 at 07:20:05PM +0300, Cyrill Gorcunov wrote:
> In vz7 we've a slightly different code base where fields
> 2 and 3 are already used. So lets reserve them and move
> raw member to another number.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>  images/sk-inet.proto | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/images/sk-inet.proto b/images/sk-inet.proto
> index 84306ad5a4b0..75d565dcdd4c 100644
> --- a/images/sk-inet.proto
> +++ b/images/sk-inet.proto
> @@ -13,7 +13,8 @@ message ip_opts_raw_entry {
>  
>  message ip_opts_entry {
>  	optional bool			freebind	= 1;
> -	optional ip_opts_raw_entry	raw		= 2;
> +	// Fields 2 and 3 are reserved for vz7 use

How does criu use these fields?

> +	optional ip_opts_raw_entry	raw		= 4;
>  }
>  
>  message inet_sk_entry {
> -- 
> 2.17.1
>
Cyrill Gorcunov Sept. 26, 2018, 8:47 p.m.
On Wed, Sep 26, 2018 at 07:57:39PM +0000, Andrey Vagin wrote:
> >  
> >  message ip_opts_entry {
> >  	optional bool			freebind	= 1;
> > -	optional ip_opts_raw_entry	raw		= 2;
> > +	// Fields 2 and 3 are reserved for vz7 use
> 
> How does criu use these fields?

In vz7 we've had raw socket support for a long time already.
And these teo members are used for raw sockets options.
I dropped old raw support from vz7 instance and merged
vanilla's variant of raw sockets. But to keep backward
compatibility in vz7 the members can be used in old
criu images.
Andrei Vagin Oct. 10, 2018, 6:38 a.m.
Applied

On Tue, Sep 25, 2018 at 07:20:05PM +0300, Cyrill Gorcunov wrote:
> In vz7 we've a slightly different code base where fields
> 2 and 3 are already used. So lets reserve them and move
> raw member to another number.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
>  images/sk-inet.proto | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/images/sk-inet.proto b/images/sk-inet.proto
> index 84306ad5a4b0..75d565dcdd4c 100644
> --- a/images/sk-inet.proto
> +++ b/images/sk-inet.proto
> @@ -13,7 +13,8 @@ message ip_opts_raw_entry {
>  
>  message ip_opts_entry {
>  	optional bool			freebind	= 1;
> -	optional ip_opts_raw_entry	raw		= 2;
> +	// Fields 2 and 3 are reserved for vz7 use
> +	optional ip_opts_raw_entry	raw		= 4;
>  }
>  
>  message inet_sk_entry {
> -- 
> 2.17.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu