[ovs-dev] [PATCH v3] ovs-hyperv: make kernel return values netlink socket like

Eitan Eliahu eliahue at vmware.com
Wed Apr 29 14:59:49 UTC 2015


Besides that LG.
Thanks,
Eitan

-----Original Message-----
From: Nithin Raju 
Sent: Wednesday, April 29, 2015 7:38 AM
To: Eitan Eliahu
Cc: dev at openvswitch.org
Subject: Re: [ovs-dev] [PATCH v3] ovs-hyperv: make kernel return values netlink socket like

Thanks for the review.

> On Apr 29, 2015, at 6:06 AM, Eitan Eliahu <eliahue at vmware.com> wrote:
> 
> 
> Hi Nithin,
> Sorry, I come late on this one, change looks good.
> 
> We need to check if the IRP output buffer is big enough to fit the transaction message before copying it. Otherwise, we need to return error and break the NetLink connection.

That’s a good point. There are some checks before hand when we validate the ioctl command, where we check for a “minimum size” for the output buffer. The parameter #3 to MapIrpOutputBuffer() is a “required length”. Pls. let me know if I need to add more checks.

---
     case OVS_IOCTL_READ_EVENT:
     case OVS_IOCTL_READ_PACKET:
         /*
          * Output buffer is mandatory. These IOCTLs are used to read events and
          * packets respectively. It is convenient to have separate ioctls.
          */
         if (outputBufferLen != 0) {
             status = MapIrpOutputBuffer(irp, outputBufferLen,
                                         sizeof *ovsMsg, &outputBuffer);
---

thanks,
-- Nithin


More information about the dev mailing list