Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joanne Hugé
re6stnet
Commits
47f69a00
Commit
47f69a00
authored
Aug 25, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redistribute default routes with src-prefix
parent
4d542109
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
re6st/cli/node.py
re6st/cli/node.py
+2
-3
re6st/plib.py
re6st/plib.py
+6
-5
No files found.
re6st/cli/node.py
View file @
47f69a00
...
@@ -421,9 +421,8 @@ def main():
...
@@ -421,9 +421,8 @@ def main():
config
.
babel_args
+=
config
.
iface_list
config
.
babel_args
+=
config
.
iface_list
cleanup
.
append
(
plib
.
router
((
my_ip
,
len
(
subnet
)),
ipv4
,
cleanup
.
append
(
plib
.
router
((
my_ip
,
len
(
subnet
)),
ipv4
,
None
if
config
.
gateway
else
my_network
if
config
.
gateway
or
config
.
default
else
None
,
''
if
config
.
default
else
config
.
gateway
,
cache
.
hello
,
my_network
,
cache
.
hello
,
os
.
path
.
join
(
config
.
log
,
'babeld.log'
),
os
.
path
.
join
(
config
.
log
,
'babeld.log'
),
os
.
path
.
join
(
config
.
state
,
'babeld.state'
),
os
.
path
.
join
(
config
.
state
,
'babeld.state'
),
os
.
path
.
join
(
config
.
run
,
'babeld.pid'
),
os
.
path
.
join
(
config
.
run
,
'babeld.pid'
),
...
...
re6st/plib.py
View file @
47f69a00
...
@@ -62,7 +62,7 @@ def client(iface, address_list, encrypt, *args, **kw):
...
@@ -62,7 +62,7 @@ def client(iface, address_list, encrypt, *args, **kw):
return
openvpn
(
iface
,
encrypt
,
*
remote
,
**
kw
)
return
openvpn
(
iface
,
encrypt
,
*
remote
,
**
kw
)
def
router
(
ip
,
ip4
,
src
,
hello_interval
,
log_path
,
state_path
,
pidfile
,
def
router
(
ip
,
ip4
,
src
,
gateway
,
hello_interval
,
log_path
,
state_path
,
pidfile
,
control_socket
,
default
,
hmac
,
*
args
,
**
kw
):
control_socket
,
default
,
hmac
,
*
args
,
**
kw
):
ip
,
n
=
ip
ip
,
n
=
ip
hmac_sign
,
hmac_accept
=
hmac
hmac_sign
,
hmac_accept
=
hmac
...
@@ -98,11 +98,12 @@ def router(ip, ip4, src, hello_interval, log_path, state_path, pidfile,
...
@@ -98,11 +98,12 @@ def router(ip, ip4, src, hello_interval, log_path, state_path, pidfile,
if
ip4
:
if
ip4
:
cmd
+=
'-C'
,
'redistribute ip %s/%s eq %s'
%
(
ip4
,
n4
,
n4
)
cmd
+=
'-C'
,
'redistribute ip %s/%s eq %s'
%
(
ip4
,
n4
,
n4
)
if
src
:
if
src
:
cmd
+=
'-C'
,
'install ip ::/0 eq 0 src-prefix '
+
src
if
gateway
:
elif
src
is
None
:
cmd
+=
'-C'
,
'redistribute ip ::/0 eq 0 src-prefix '
+
src
cmd
+=
'-C'
,
'redistribute ip ::/0 eq 0'
else
:
cmd
+=
'-C'
,
'install ip ::/0 eq 0 src-prefix '
+
src
+
' pref-src '
+
ip
cmd
+=
(
'-C'
,
'redistribute deny'
,
cmd
+=
(
'-C'
,
'redistribute deny'
,
'-C'
,
'install pref-src '
+
ip
)
'-C'
,
'install
ip ::/0 ge 1
pref-src '
+
ip
)
if
ip4
:
if
ip4
:
cmd
+=
'-C'
,
'install pref-src '
+
ip4
cmd
+=
'-C'
,
'install pref-src '
+
ip4
if
control_socket
:
if
control_socket
:
...
...
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