net: Don't try to restore sit6rd when not present

Submitted by Pavel Emelianov on July 19, 2017, 9:04 a.m.

Details

Message ID 3da50e5f-910a-8ebe-f64b-da808f706796@virtuozzo.com
State Accepted
Series "net: Don't try to restore sit6rd when not present"
Commit 198d9e1baaa334fa7ef1251885b997a7dd61a37a
Headers show

Commit Message

Pavel Emelianov July 19, 2017, 9:04 a.m.
Due to a misprint in an if the 6rd info for sit device
was restored when not present.

https://github.com/xemul/criu/issues/366

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 criu/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/net.c b/criu/net.c
index 8b479fc..8662e5a 100644
--- a/criu/net.c
+++ b/criu/net.c
@@ -1467,7 +1467,7 @@  static int sit_link_info(struct ns_id *ns, struct net_link *link, struct newlink
 	DECODE_ENTRY(u16, IFLA_IPTUN_ENCAP_SPORT, encap_sport);
 	DECODE_ENTRY(u16, IFLA_IPTUN_ENCAP_DPORT, encap_dport);
 
-	if (!se->has_rd_prefixlen) {
+	if (se->has_rd_prefixlen) {
 		u16 aux;
 
 		if (se->n_rd_prefix != 4) {

Comments

Andrey Vagin July 19, 2017, 6:17 p.m.
Applied, thanks
On Wed, Jul 19, 2017 at 12:04:03PM +0300, Pavel Emelyanov wrote:
> Due to a misprint in an if the 6rd info for sit device
> was restored when not present.
> 
> https://github.com/xemul/criu/issues/366
> 
> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
> ---
>  criu/net.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/net.c b/criu/net.c
> index 8b479fc..8662e5a 100644
> --- a/criu/net.c
> +++ b/criu/net.c
> @@ -1467,7 +1467,7 @@ static int sit_link_info(struct ns_id *ns, struct net_link *link, struct newlink
>  	DECODE_ENTRY(u16, IFLA_IPTUN_ENCAP_SPORT, encap_sport);
>  	DECODE_ENTRY(u16, IFLA_IPTUN_ENCAP_DPORT, encap_dport);
>  
> -	if (!se->has_rd_prefixlen) {
> +	if (se->has_rd_prefixlen) {
>  		u16 aux;
>  
>  		if (se->n_rd_prefix != 4) {
> -- 
> 2.1.4
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu