Re: bgpd cleanup around mask2prefixlen

2023-10-17 Thread Theo Buehler
On Tue, Oct 17, 2023 at 04:47:36PM +0200, Claudio Jeker wrote: > Looking at fixing portable I realized that some bits around mask2prefixlen > can be cleaned up. > > First in session.c the plen != 0xff check is not needed since it never can > happen. > > 2nd the checks for sin_len and sin6_len ==

bgpd cleanup around mask2prefixlen

2023-10-17 Thread Claudio Jeker
Looking at fixing portable I realized that some bits around mask2prefixlen can be cleaned up. First in session.c the plen != 0xff check is not needed since it never can happen. 2nd the checks for sin_len and sin6_len == 0 are also impossible. A sockaddr can not have length 0. A default route