Re: bgpd: adjust ctl_neighbor usage

2023-07-20 Thread Claudio Jeker
On Thu, Jul 20, 2023 at 05:22:25PM +0200, Theo Buehler wrote: > On Thu, Jul 20, 2023 at 05:06:00PM +0200, Claudio Jeker wrote: > > I think it is better to use a safe ideom when matching against a peer name > > instead of forcefully NUL terminate the string somewhere unrelated. > > By default all

Re: bgpd: adjust ctl_neighbor usage

2023-07-20 Thread Theo de Raadt
Theo Buehler wrote: > On Thu, Jul 20, 2023 at 05:22:25PM +0200, Theo Buehler wrote: > > On Thu, Jul 20, 2023 at 05:06:00PM +0200, Claudio Jeker wrote: > > > I think it is better to use a safe ideom when matching against a peer name > > > instead of forcefully NUL terminate the string somewhere

Re: bgpd: adjust ctl_neighbor usage

2023-07-20 Thread Theo de Raadt
Theo Buehler wrote: > On Thu, Jul 20, 2023 at 05:06:00PM +0200, Claudio Jeker wrote: > > I think it is better to use a safe ideom when matching against a peer name > > instead of forcefully NUL terminate the string somewhere unrelated. > > By default all these string buffers use the same size so

Re: bgpd: adjust ctl_neighbor usage

2023-07-20 Thread Theo Buehler
On Thu, Jul 20, 2023 at 05:22:25PM +0200, Theo Buehler wrote: > On Thu, Jul 20, 2023 at 05:06:00PM +0200, Claudio Jeker wrote: > > I think it is better to use a safe ideom when matching against a peer name > > instead of forcefully NUL terminate the string somewhere unrelated. > > By default all

Re: bgpd: adjust ctl_neighbor usage

2023-07-20 Thread Theo Buehler
On Thu, Jul 20, 2023 at 05:06:00PM +0200, Claudio Jeker wrote: > I think it is better to use a safe ideom when matching against a peer name > instead of forcefully NUL terminate the string somewhere unrelated. > By default all these string buffers use the same size so strncmp() will > not clip

bgpd: adjust ctl_neighbor usage

2023-07-20 Thread Claudio Jeker
I think it is better to use a safe ideom when matching against a peer name instead of forcefully NUL terminate the string somewhere unrelated. By default all these string buffers use the same size so strncmp() will not clip since the peer description is enforced by bgpd to be smaller. Another