Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
snf-nfdhcpd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
itminedu
snf-nfdhcpd
Commits
824aaeab
Commit
824aaeab
authored
Sep 27, 2016
by
Nikos Skalkotos
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix-0.12.4'
parents
d5e2dde2
c62abdba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
+25
-5
docs/conf.py
docs/conf.py
+2
-2
nfdhcpd
nfdhcpd
+22
-2
version
version
+1
-1
No files found.
docs/conf.py
View file @
824aaeab
...
...
@@ -41,7 +41,7 @@ master_doc = 'index'
# General information about the project.
project
=
u
'nfdhcpd'
copyright
=
u
'2010-201
3
, GRNET S.A. All rights reserved'
copyright
=
u
'2010-201
6
, GRNET S.A. All rights reserved'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
...
...
@@ -50,7 +50,7 @@ copyright = u'2010-2013, GRNET S.A. All rights reserved'
# The short X.Y version.
version
=
'0.12'
# The full version, including alpha/beta/rc tags.
release
=
'0.12.
3
'
release
=
'0.12.
4
'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
...
...
nfdhcpd
View file @
824aaeab
...
...
@@ -126,6 +126,26 @@ DHCP_REQRESP = {
DHCPINFORM
:
DHCPACK
,
}
def
ipv62mac
(
ipv6
):
# remove subnet info if given
subnetIndex
=
ipv6
.
find
(
"/"
)
if
subnetIndex
!=
-
1
:
ipv6
=
ipv6
[:
subnetIndex
]
ipv6Parts
=
ipv6
.
split
(
":"
)
macParts
=
[]
for
ipv6Part
in
ipv6Parts
[
-
4
:]:
while
len
(
ipv6Part
)
<
4
:
ipv6Part
=
"0"
+
ipv6Part
macParts
.
append
(
ipv6Part
[:
2
])
macParts
.
append
(
ipv6Part
[
-
2
:])
# modify parts to match MAC value
macParts
[
0
]
=
"%02x"
%
(
int
(
macParts
[
0
],
16
)
^
2
)
del
macParts
[
4
]
del
macParts
[
3
]
return
":"
.
join
(
macParts
)
def
get_indev
(
payload
):
try
:
...
...
@@ -790,9 +810,9 @@ class VMNetProxy(object): # pylint: disable=R0902
pkt
=
IPv6
(
payload
.
get_data
())
#logging.debug(pkt.show())
try
:
mac
=
pkt
.
lladdr
mac
=
ipv62mac
(
pkt
.
src
)
except
:
logging
.
debug
(
" - RS: Cannot obtain
lladdr
"
)
logging
.
debug
(
" - RS: Cannot obtain
MAC
"
)
return
indev
=
get_indev
(
payload
)
...
...
version
View file @
824aaeab
0.12.
3
0.12.
4
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