On Mon, Jan 04, 2021 at 08:48:55PM +0100, Otto Moerbeek wrote:
> On Mon, Jan 04, 2021 at 05:50:53PM +0100, Otto Moerbeek wrote:
>
> > tOn Mon, Jan 04, 2021 at 01:42:48PM +0100, Theo Buehler wrote:
> >
> > > > > + return log_sockaddr(addr2sa(addr, 0, &len), len);
> > > >
> > > > Perha
On Mon, Jan 04, 2021 at 05:50:53PM +0100, Otto Moerbeek wrote:
> tOn Mon, Jan 04, 2021 at 01:42:48PM +0100, Theo Buehler wrote:
>
> > > > + return log_sockaddr(addr2sa(addr, 0, &len), len);
> > >
> > > Perhaps I haven't yet had enough coffee this year, but I'm unsure
> > > whether
On Mon, Jan 04, 2021 at 01:42:48PM +0100, Theo Buehler wrote:
> > > + return log_sockaddr(addr2sa(addr, 0, &len), len);
> >
> > Perhaps I haven't yet had enough coffee this year, but I'm unsure
> > whether it is actually guaranteed that addr2sa() is called before the
> > second len in this
tOn Mon, Jan 04, 2021 at 01:42:48PM +0100, Theo Buehler wrote:
> > > + return log_sockaddr(addr2sa(addr, 0, &len), len);
> >
> > Perhaps I haven't yet had enough coffee this year, but I'm unsure
> > whether it is actually guaranteed that addr2sa() is called before the
> > second len in th
OK
On Mon, Jan 04, 2021 at 10:46:39AM +0100, Claudio Jeker wrote:
> In bgpd most prefixes and addresses are stored as struct bgpd_addr. When
> it is printed it uses inet_ntop() which is not ideal since it does not
> handle IPv6 scoped_id. Instead convert to a struct sockaddr and use
> log_sockaddr
> > + return log_sockaddr(addr2sa(addr, 0, &len), len);
>
> Perhaps I haven't yet had enough coffee this year, but I'm unsure
> whether it is actually guaranteed that addr2sa() is called before the
> second len in this line is passed to log_sockaddr().
Answering my own question: C99 and
On Mon, Jan 04, 2021 at 10:46:39AM +0100, Claudio Jeker wrote:
> In bgpd most prefixes and addresses are stored as struct bgpd_addr. When
> it is printed it uses inet_ntop() which is not ideal since it does not
> handle IPv6 scoped_id. Instead convert to a struct sockaddr and use
> log_sockaddr() w
In bgpd most prefixes and addresses are stored as struct bgpd_addr. When
it is printed it uses inet_ntop() which is not ideal since it does not
handle IPv6 scoped_id. Instead convert to a struct sockaddr and use
log_sockaddr() which in turn uses getnameinfo.
Ideally the same should be done for the