Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-28 Thread Burt Silverman
Way back when I must have been dealing with u8* versus char* rather than u8[] versus char[], but that slight bit of confusion on my part does not change my suggestion:-) Burt On Thu, Apr 27, 2017 at 4:09 PM, Burt Silverman wrote: > If I were coding, in addition to Jon's

Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-27 Thread Burt Silverman
If I were coding, in addition to Jon's change, I probably would change "u8" to "char" for the type of hostname elements in the dhcp_client_config and dhcp_compl_event in dhcp.api, because way back when I liked to think of u8 as a hint that the array is a vector style string, i.e., not terminated

Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-27 Thread Luke, Chris
> Jon Loeliger said: >> On Thu, Apr 27, 2017 at 12:19 PM, Luke, Chris >> wrote: >> [...] What I am not sure of is NUL in DHCP hostname strings – I remember >> reading somewhere >> it’s optional, so I suspect that means the TLV length is used to determine >> the

Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-27 Thread Jon Loeliger
On Thu, Apr 27, 2017 at 12:19 PM, Luke, Chris wrote: > It looks, to me, like someone fixed a problem in the wrong place. > > > > I would certainly entertain the patch, especially if it included logic to > make sure mp->hostname doesn’t overrun. Not likely since the DHCP

Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-27 Thread Luke, Chris
o:j...@netgate.com] Sent: Thursday, April 27, 2017 11:28 To: Luke, Chris <chris_l...@cable.comcast.com> Cc: vpp-dev <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice On Wed, Apr 26, 2017 at 3:37 PM, Luke, Chris <chris_l...@comcast.com<mailto:chris_l..

Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-27 Thread Jon Loeliger
vpp-dev-boun...@lists.fd.io] *On > Behalf Of *Jon Loeliger > *Sent:* Wednesday, April 26, 2017 4:24 PM > *To:* vpp-dev <vpp-dev@lists.fd.io> > *Subject:* [vpp-dev] A Curious DHCP Hostname Terminator Choice > > > > Hi Guys, > > > > Way over in src/vnet/dhc

Re: [vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-26 Thread Luke, Chris
Definitely looks spurious to me. Chris. From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of Jon Loeliger Sent: Wednesday, April 26, 2017 4:24 PM To: vpp-dev <vpp-dev@lists.fd.io> Subject: [vpp-dev] A Curious DHCP Hostname Terminator Choice Hi Guys, Wa

[vpp-dev] A Curious DHCP Hostname Terminator Choice

2017-04-26 Thread Jon Loeliger
Hi Guys, Way over in src/vnet/dhcp/dhcp_api.c, we find the function void dhcp_compl_event_callback (u32 client_index, u32 pid, u8 * hostname, u8 is_ipv6, u8 * host_address, u8 * router_address, u8 * host_mac) which contains a curious use of