[systemd-devel] [PATCH v2 23/26] dhcp: Process DHCP Ack/Nak message

Patrik Flykt Patrik.Flykt at linux.intel.com
Wed Nov 27 06:58:41 PST 2013


On Tue, 2013-11-26 at 00:26 +0100, Lennart Poettering wrote:
> On Mon, 25.11.13 09:13, Patrik Flykt (patrik.flykt at linux.intel.com) wrote:
> 
> > -static int client_receive_offer(DHCPClient *client,
> > -                                DHCPPacket *offer, int len)
> > +static int client_verify_headers(DHCPClient *client,
> > +                                 DHCPPacket *message, int len)
> 
> Thhis all looks like "size_t len" is the right param here, not "int".

Ok.

> > +        lease = new0(DHCPLease, 1);
> > +        if (!lease)
> > +                return -ENOBUFS;
> 
> OOM should result in ENOMEM, nothing else please. ENOBUFS is something
> else: it indicates some local limit to be hit, not a global memory
> shortage.

Forgotten from the previous fixing, sorry!

Cheers,

	Patrik




More information about the systemd-devel mailing list