Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
8f013d9c
Commit
8f013d9c
authored
Nov 24, 1999
by
Pavel Machek
Browse files
Sorry, previous commit did not even compile.
parent
48f9e019
Changes
2
Hide whitespace changes
Inline
Side-by-side
filter/config.Y
View file @
8f013d9c
...
...
@@ -184,7 +184,7 @@ pair:
* Complex types, their bison value is struct f_val
*/
prefix_s:
IPA '/' NUM { $$.type = T_PREFIX; $$.val.px.ip = $1; $$.val.px.len = $3;
printf( "ook, we have prefix here\n"
); }
IPA '/' NUM { $$.type = T_PREFIX; $$.val.px.ip = $1; $$.val.px.len = $3;
cf_error( "%I/%d is not really prefix\n", $$.val.px.ip, $$.val.px.len
); }
;
prefix:
...
...
filter/filter.c
View file @
8f013d9c
...
...
@@ -90,7 +90,7 @@ val_simple_in_range(struct f_val v1, struct f_val v2)
mask
=
ipa_mkmask
(
v2
.
val
.
px
.
len
&
LEN_MASK
);
if
(
ipa_compare
(
ipa_and
(
v2
.
val
.
px
.
ip
,
mask
),
ipa_and
(
v1
.
val
.
px
.
ip
,
mask
)))
return
0
;
/* FIXME: read rpsl or better ask mj: is it really like this? */
if
((
v2
.
val
.
px
.
len
&
LEN_MINUS
)
&&
(
v1
.
val
.
px
.
len
<=
(
v2
.
val
.
px
.
len
&
LEN_MASK
)))
return
0
;
if
((
v2
.
val
.
px
.
len
&
LEN_PLUS
)
&&
(
v1
.
val
.
px
.
len
<
(
v2
.
val
.
px
.
len
&
LEN_MASK
)))
...
...
@@ -216,7 +216,6 @@ interpret(struct f_inst *what)
case
'<'
:
COMPARE
(
i
==-
1
);
case
'
<=
'
:
COMPARE
(
i
!=
1
);
/* FIXME: Should be able to work with prefixes of limited sizes */
case
'~'
:
TWOARGS
;
res
.
type
=
T_BOOL
;
...
...
@@ -357,8 +356,8 @@ interpret(struct f_inst *what)
break
;
}
*
f_rte
=
rte_do_cow
(
*
f_rte
);
l
->
next
=
*
f_rte
->
attrs
->
eattrs
;
*
f_rte
->
attrs
->
eattrs
=
l
;
l
->
next
=
(
*
f_rte
)
->
attrs
->
eattrs
;
(
*
f_rte
)
->
attrs
->
eattrs
=
l
;
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment