[CRIU] [PATCH 2/2] net: Don't fail on missing icmp entries

Cyrill Gorcunov gorcunov at gmail.com
Tue May 12 01:39:15 PDT 2015


On Tue, May 12, 2015 at 11:30:29AM +0300, Pavel Emelyanov wrote:
> 
> > @@ -114,6 +124,14 @@ static int ipv4_conf_op(char *tgt, int *conf, int op, NetnsEntry **netns)
> >  		pr_err("Failed to %s %s/<confs>\n", (op == CTL_READ)?"read":"write", tgt);
> >  		return -1;
> >  	}
> > +
> > +	if (op == CTL_READ) {
> > +		for (i = 0; i < ri; i++) {
> > +			if (req[i].status & CTL_STATUS_ENOENT)
> > +				*(int *)req[i].arg = DEVCONFS_UNUSED;
> > +		}
> > +	}
> > +
> >  	return 0;
> >  }
> >  
> > 
> 
> I don't like this loop. Can we assign -1-s in the beginning of the
> ipv4_conf_op?

req is a structure so we have to walk over even to assign -1's there,
so i don't see much difference.


More information about the CRIU mailing list