This is a good solution. Thanks.
On Thu, Aug 1, 2013 at 6:58 PM, Jesse Gross <je...@nicira.com> wrote: > On Thu, Aug 1, 2013 at 4:39 PM, Andy Zhou <az...@nicira.com> wrote: > > acked-by: Andy Zhou <az...@nicira.com> > > > > > > On Thu, Aug 1, 2013 at 4:17 PM, Jesse Gross <je...@nicira.com> wrote: > >> > >> A tunnel value attribute is not allowed to have an empty IP destination > >> address but this is legal for masks. This drops both the checks for > >> serializing masks and also the sanity checks on them. > >> > >> Signed-off-by: Jesse Gross <je...@nicira.com> > >> --- > >> datapath/flow.c | 5 ++++- > >> lib/odp-util.c | 2 +- > >> 2 files changed, 5 insertions(+), 2 deletions(-) > >> > >> diff --git a/datapath/flow.c b/datapath/flow.c > >> index ebe8fb3..457d123 100644 > >> --- a/datapath/flow.c > >> +++ b/datapath/flow.c > >> @@ -1248,6 +1248,9 @@ int ipv4_tun_from_nlattr(const struct nlattr > *attr, > >> return -EINVAL; > >> } > >> > >> + if (is_mask) > >> + return 0; > >> + > > > > This change works. How about make the ttl check only apply to key, like > > ipv4_dst, so we don't have a normal return from the middle of the > function? > > The problem with that check is that it runs during both key and mask > processing. The that makes the order of processing significant because > if the mask were to be run first then it would legitimately find a > zero. I changed this so the key tests are wrapped in the !is_mask > check, so there's only one return statement. > > Thanks for the reviews, I'll push these two patches shortly. >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev