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
ab4da342
Commit
ab4da342
authored
Jul 18, 2015
by
Ondřej Zajíček
Browse files
Direct: Fixes behavior for the same routes on different interfaces
Thanks to Andrew (seti.kr.ua) for the bug report.
parent
8d9eef17
Changes
1
Hide whitespace changes
Inline
Side-by-side
nest/rt-dev.c
View file @
ab4da342
...
...
@@ -51,7 +51,10 @@ dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
DBG
(
"dev_if_notify: device shutdown: prefix not found
\n
"
);
return
;
}
rte_update
(
p
,
n
,
NULL
);
/* Use iface ID as local source ID */
struct
rte_src
*
src
=
rt_get_source
(
p
,
ad
->
iface
->
index
);
rte_update2
(
p
->
main_ahook
,
n
,
NULL
,
src
);
}
else
if
(
c
&
IF_CHANGE_UP
)
{
...
...
@@ -61,8 +64,11 @@ dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
DBG
(
"dev_if_notify: %s:%I going up
\n
"
,
ad
->
iface
->
name
,
ad
->
ip
);
/* Use iface ID as local source ID */
struct
rte_src
*
src
=
rt_get_source
(
p
,
ad
->
iface
->
index
);
rta
a0
=
{
.
src
=
p
->
main_sou
rc
e
,
.
src
=
s
rc
,
.
source
=
RTS_DEVICE
,
.
scope
=
SCOPE_UNIVERSE
,
.
cast
=
RTC_UNICAST
,
...
...
@@ -75,7 +81,7 @@ dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
e
=
rte_get_temp
(
a
);
e
->
net
=
n
;
e
->
pflags
=
0
;
rte_update
(
p
,
n
,
e
);
rte_update
2
(
p
->
main_ahook
,
n
,
e
,
src
);
}
}
...
...
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