simple filters question
Sergey Popovich
popovich_sergei at mail.ru
Mon Nov 11 09:08:30 CET 2013
В письме от 9 ноября 2013 07:42:06 Вы написали:
> Hi,
>
> I applied this code manually:
>
> + if ((v1.type == T_IP) && (v2.type == T_PREFIX_SET)) {
> + v1.val.px.len = MAX_PREFIX_LENGTH;
> + return trie_match_fprefix(v2.val.ti, &v1.val.px);
> + }
>
> To filter.c
>
> However maybe the patch failed because I don't have the following:
>
> if (v2.type != T_SET)
> return CMP_ERROR;
>
>
> Maybe the patch that was sent was within a different branch than the main
> 1.3.11 that's available for download?
>
Oh sorry, John, I patch really was made on top of current upstream tree, not
1.3.11. In attachment udpated patch version applied on top of 1.3.11 stable
tree.
Sorry for that.
And yes, really according to documentation we could match only on set with
elements of same tyme. On the other hand, an ip type may be easily represented
as prefix with length of max AFI prefix length (32 - IPv4, 128 - IPv6, so I
see no problem using this conversion of ip to prefix type.
Moreover on IPv4 BIRD build there is implicit conversion of ip type to quad
as on IPv4 they basically represent value with same format.
Thanks for your note.
--
SP5474-RIPE
Sergey Popovich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bird-1.3.11-match-T_IP-against-T_PREFIX_SET-v2.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20131111/deaa24a6/attachment-0001.bin>
More information about the Bird-users
mailing list