From: Ben Pfaff Date: Wed, 10 Feb 2016 20:18:46 +0000 (-0800) Subject: pinctrl: Fix decoding of OFPT_GET_CONFIG_REPLY messages. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=f9c83246a76c3585d13ed8414f17d2a65adc1235 pinctrl: Fix decoding of OFPT_GET_CONFIG_REPLY messages. Fixes: ad99e2ed49 (Better abstract OFPT_SET_CONFIG and OFPT_GET_CONFIG_REPLY, make stricter.) Reported-by: Numan Siddique Signed-off-by: Ben Pfaff --- diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c index 360f38b66..239b3ad0c 100644 --- a/ovn/controller/pinctrl.c +++ b/ovn/controller/pinctrl.c @@ -1,5 +1,5 @@ -/* Copyright (c) 2015 Red Hat, Inc. +/* Copyright (c) 2015, 2016 Red Hat, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -102,6 +102,7 @@ pinctrl_recv(struct controller_ctx *ctx, const struct ofp_header *oh, struct ofp_switch_config *config_, config; ofpbuf_use_const(&rq_buf, oh, ntohs(oh->length)); + ofpraw_pull_assert(&rq_buf); config_ = ofpbuf_pull(&rq_buf, sizeof *config_); config = *config_; config.miss_send_len = htons(UINT16_MAX);