Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
0858666b
Commit
0858666b
authored
Mar 09, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use RTPROT_BABEL_LOCAL throughout.
parent
e66658b0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
10 deletions
+9
-10
babel.h
babel.h
+2
-0
filter.c
filter.c
+2
-2
filter.h
filter.h
+0
-2
kernel.h
kernel.h
+0
-2
kernel_netlink.c
kernel_netlink.c
+1
-1
xroute.c
xroute.c
+4
-3
No files found.
babel.h
View file @
0858666b
...
...
@@ -32,6 +32,8 @@ THE SOFTWARE.
#define RTPROT_BABEL 42
#endif
#define RTPROT_BABEL_LOCAL -2
#undef MAX
#undef MIN
...
...
filter.c
View file @
0858666b
...
...
@@ -217,7 +217,7 @@ parse_filter(gnc_t gnc, void *closure)
goto
error
;
filter
->
proto
=
proto
;
}
else
if
(
strcmp
(
token
,
"local"
)
==
0
)
{
filter
->
proto
=
PROTO
_LOCAL
;
filter
->
proto
=
RTPROT_BABEL
_LOCAL
;
}
else
if
(
strcmp
(
token
,
"if"
)
==
0
)
{
char
*
interface
;
c
=
getword
(
c
,
&
interface
,
gnc
,
closure
);
...
...
@@ -422,7 +422,7 @@ filter_match(struct filter *f, const unsigned char *id,
if
(
f
->
proto
)
{
if
(
!
proto
||
f
->
proto
!=
proto
)
return
0
;
}
else
if
(
proto
==
PROTO
_LOCAL
)
{
}
else
if
(
proto
==
RTPROT_BABEL
_LOCAL
)
{
return
0
;
}
return
1
;
...
...
filter.h
View file @
0858666b
...
...
@@ -22,8 +22,6 @@ THE SOFTWARE.
#define METRIC_INHERIT (INFINITY + 1)
#define PROTO_LOCAL -2
struct
filter
{
int
af
;
char
*
ifname
;
...
...
kernel.h
View file @
0858666b
...
...
@@ -24,8 +24,6 @@ THE SOFTWARE.
#define KERNEL_INFINITY 0xFFFF
#define RTPROTO_BABEL_LOCAL 257
struct
kernel_route
{
unsigned
char
prefix
[
16
];
int
plen
;
...
...
kernel_netlink.c
View file @
0858666b
...
...
@@ -1101,7 +1101,7 @@ filter_addresses(struct nlmsghdr *nh, void *data)
route
->
plen
=
128
;
route
->
metric
=
0
;
route
->
ifindex
=
ifa
->
ifa_index
;
route
->
proto
=
RTPROT
O
_BABEL_LOCAL
;
route
->
proto
=
RTPROT_BABEL_LOCAL
;
memset
(
route
->
gw
,
0
,
16
);
*
found
=
(
*
found
)
+
1
;
}
...
...
xroute.c
View file @
0858666b
...
...
@@ -134,7 +134,8 @@ check_xroutes()
export
=
1
;
}
else
if
(
xroutes
[
i
].
kind
==
XROUTE_LOCAL
)
{
metric
=
redistribute_filter
(
xroutes
[
i
].
prefix
,
xroutes
[
i
].
plen
,
xroutes
[
i
].
ifindex
,
PROTO_LOCAL
);
xroutes
[
i
].
ifindex
,
RTPROT_BABEL_LOCAL
);
if
(
metric
==
METRIC_INHERIT
)
metric
=
0
;
if
(
metric
<
INFINITY
&&
metric
==
xroutes
[
i
].
metric
)
{
...
...
@@ -187,13 +188,13 @@ check_xroutes()
if
(
martian_prefix
(
addresses
[
i
].
prefix
,
addresses
[
i
].
plen
))
continue
;
metric
=
redistribute_filter
(
addresses
[
i
].
prefix
,
addresses
[
i
].
plen
,
addresses
[
i
].
ifindex
,
PROTO
_LOCAL
);
addresses
[
i
].
ifindex
,
RTPROT_BABEL
_LOCAL
);
if
(
metric
==
METRIC_INHERIT
)
metric
=
0
;
if
(
metric
<
INFINITY
)
{
rc
=
add_xroute
(
XROUTE_LOCAL
,
addresses
[
i
].
prefix
,
addresses
[
i
].
plen
,
0
,
addresses
[
i
].
ifindex
,
PROTO
_LOCAL
);
0
,
addresses
[
i
].
ifindex
,
RTPROT_BABEL
_LOCAL
);
if
(
rc
)
change
=
1
;
}
...
...
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