[PATCH v2] babel: Implement IPv6 prefix compression on outgoing updates

Ondrej Zajicek santiago at crfreenet.org
Fri Jun 9 14:44:53 CEST 2017


On Tue, Jun 06, 2017 at 02:52:15PM +0200, Toke Høiland-Jørgensen wrote:
> Previously, the Babel protocol would never use prefix compression on outgoing
> updates (but would parse it on incoming ones). This adds compression of IPv6
> addresses of outgoing updates.

Thanks, merged.

> +static inline uint bytes_equal(u8 *b1, u8 *b2, uint maxlen)
> +{
> +  uint i;
> +  for(i = 0; *b1 == *b2 && i < maxlen; i++, b1++, b2++)
> +    ;
> +  return i;
> +}

Note that there was off-by-one read error, as maxlen is checked after
the b1, b2. Fixed.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170609/0d342a33/attachment.asc>


More information about the Bird-users mailing list