Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9dbcb7c6
authored
Oct 25, 2017
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'issue_9' into 'master'"
This reverts merge request
!11
parent
4f7a7551
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
26 deletions
+0
-26
netcelery.py
+0
-1
netdriver.py
+0
-24
vmcelery.py
+0
-1
No files found.
netcelery.py
View file @
9dbcb7c6
...
...
@@ -22,7 +22,6 @@ AMQP_URI = getenv('AMQP_URI')
def
to_bool
(
value
):
return
value
.
lower
()
in
(
"true"
,
"yes"
,
"y"
,
"t"
)
lib_connection
=
None
native_ovs
=
False
...
...
netdriver.py
View file @
9dbcb7c6
...
...
@@ -63,8 +63,6 @@ def build_flow_rule(
protocol
=
None
,
nw_src
=
None
,
ipv6_src
=
None
,
icmp_type
=
None
,
nd_target
=
None
,
tp_dst
=
None
,
priority
=
None
,
actions
=
None
):
...
...
@@ -76,8 +74,6 @@ def build_flow_rule(
protocol - Protocol for the rule like ip,ipv6,arp,udp,tcp
nw_src - Source network IP(v4)
ipv6_src - Source network IP(v6)
icmp_type - ICMP/ICMPv6 type
nd_target - IPv6 Neighbor Discovery target IP(v6)
tp_dst - Destination port
priority - Rule priority
actions - Action for the matching rule
...
...
@@ -93,8 +89,6 @@ def build_flow_rule(
(
'
%
s'
,
protocol
),
(
'nw_src=
%
s'
,
nw_src
),
(
'ipv6_src=
%
s'
,
ipv6_src
),
(
'icmp_type=
%
s'
,
icmp_type
),
(
'nd_target=
%
s'
,
nd_target
),
(
'tp_dst=
%
s'
,
tp_dst
),
(
'priority=
%
s'
,
priority
),
(
'actions=
%
s'
,
actions
)]
...
...
@@ -164,31 +158,13 @@ def ipv4_filter(network, port_number, remove=False):
def
ipv6_filter
(
network
,
port_number
,
remove
=
False
):
""" Apply/Remove ipv6 filter rule to network. """
LINKLOCAL_SUBNET
=
"FE80::/64"
ICMPv6_NA
=
"136"
# The type of IPv6 Neighbor Advertisement
if
not
remove
:
# Enable Neighbor Advertisement from linklocal address
# if target ip same as network.ipv6
flow_cmd
=
build_flow_rule
(
in_port
=
port_number
,
dl_src
=
network
.
mac
,
protocol
=
"icmp6"
,
ipv6_src
=
LINKLOCAL_SUBNET
,
icmp_type
=
ICMPv6_NA
,
nd_target
=
network
.
ipv6
,
priority
=
42001
,
actions
=
"normal"
)
ofctl_command_execute
([
"add-flow"
,
network
.
bridge
,
flow_cmd
])
# Enable traffic from valid source
flow_cmd
=
build_flow_rule
(
in_port
=
port_number
,
dl_src
=
network
.
mac
,
protocol
=
"ipv6"
,
ipv6_src
=
network
.
ipv6
,
priority
=
42000
,
actions
=
"normal"
)
ofctl_command_execute
([
"add-flow"
,
network
.
bridge
,
flow_cmd
])
else
:
flow_cmd
=
build_flow_rule
(
in_port
=
port_number
,
dl_src
=
network
.
mac
,
protocol
=
"icmp6"
,
ipv6_src
=
LINKLOCAL_SUBNET
,
icmp_type
=
ICMPv6_NA
,
nd_target
=
network
.
ipv6
)
flow_cmd
=
build_flow_rule
(
in_port
=
port_number
,
dl_src
=
network
.
mac
,
protocol
=
"ipv6"
,
ipv6_src
=
network
.
ipv6
)
ofctl_command_execute
([
"del-flows"
,
network
.
bridge
,
flow_cmd
])
...
...
vmcelery.py
View file @
9dbcb7c6
...
...
@@ -9,7 +9,6 @@ from argparse import ArgumentParser
def
to_bool
(
value
):
return
value
.
lower
()
in
(
"true"
,
"yes"
,
"y"
,
"t"
)
if
to_bool
(
getenv
(
"LIBVIRT_TEST"
,
"False"
)):
HOSTNAME
=
"vmdriver.test"
else
:
...
...
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