Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
a7fca356
authored
Sep 02, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: rename host.ipv6_with_prefixlen
parent
ab7f458e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
circle/firewall/models.py
+4
-8
No files found.
circle/firewall/models.py
View file @
a7fca356
...
...
@@ -215,7 +215,7 @@ class Rule(models.Model):
dst
=
None
if
host
:
ip
=
(
host
.
ipv4
,
host
.
ipv6_with_prefixlen
)
ip
=
(
host
.
ipv4
,
host
.
ipv6_with_
host_
prefixlen
)
if
self
.
direction
==
'in'
:
dst
=
ip
else
:
...
...
@@ -551,13 +551,9 @@ class Host(models.Model):
self
.
ipv6
,
self
.
vlan
.
network6
.
prefixlen
)
@property
def
ipv6_with_prefixlen
(
self
):
try
:
net
=
IPNetwork
(
self
.
ipv6
)
net
.
prefixlen
=
self
.
vlan
.
host_ipv6_prefixlen
return
net
except
TypeError
:
return
None
def
ipv6_with_host_prefixlen
(
self
):
return
Host
.
create_ipnetwork
(
self
.
ipv6
,
self
.
vlan
.
host_ipv6_prefixlen
)
def
get_external_ipv4
(
self
):
return
self
.
external_ipv4
if
self
.
external_ipv4
else
self
.
ipv4
...
...
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