[ovs-dev] [PATCH 2/2] ofproto: Avoid null pointer dereference if in_band_create() fails.

Jesse Gross jesse at nicira.com
Thu May 27 01:57:06 UTC 2010


This set looks good.

On Wed, May 26, 2010 at 1:39 PM, Ben Pfaff <blp at nicira.com> wrote:

> in_band_create() can fail if something goes wrong with the network device
> that represents the local port.  In that case update_in_band_remotes()
> should not call in_band_set_remotes(), but it did anyway.  This commit
> fixes
> it.
>
> Reported-by: Tom Everman <teverman at google.com>
> ---
>  ofproto/ofproto.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
> index 7b8effd..9b90f72 100644
> --- a/ofproto/ofproto.c
> +++ b/ofproto/ofproto.c
> @@ -572,7 +572,9 @@ update_in_band_remotes(struct ofproto *ofproto)
>             in_band_create(ofproto, ofproto->dpif, ofproto->switch_status,
>                            &ofproto->in_band);
>         }
> -        in_band_set_remotes(ofproto->in_band, addrs, n_addrs);
> +        if (ofproto->in_band) {
> +            in_band_set_remotes(ofproto->in_band, addrs, n_addrs);
> +        }
>         ofproto->next_in_band_update = time_msec() + 1000;
>     } else {
>         in_band_destroy(ofproto->in_band);
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100526/58a4b910/attachment-0003.html>


More information about the dev mailing list