Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-nfdhcpd
Commits
4a3ed624
Commit
4a3ed624
authored
Aug 07, 2012
by
Dimitris Aragiorgis
Browse files
In case of make_ll64 fails return
Signed-off-by:
Dimitris Aragiorgis
<
dimara@grnet.gr
>
parent
3596e9b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
nfdhcpd
View file @
4a3ed624
...
...
@@ -283,6 +283,8 @@ class Subnet(object):
""" Compute an EUI-64 address from an EUI-48 (MAC) address
"""
if
mac
is
None
:
return
None
comp
=
mac
.
split
(
":"
)
prefix
=
IPy
.
IP
(
net
).
net
().
strFullsize
().
split
(
":"
)[:
4
]
eui64
=
comp
[:
3
]
+
[
"ff"
,
"fe"
]
+
comp
[
3
:]
...
...
@@ -681,6 +683,8 @@ class VMNetProxy(object): # pylint: disable=R0902
indevmac
=
self
.
get_iface_hw_addr
(
binding
.
indev
)
ifll
=
subnet
.
make_ll64
(
indevmac
)
if
ifll
is
None
:
return
resp
=
Ether
(
src
=
indevmac
)
/
\
...
...
@@ -742,6 +746,8 @@ class VMNetProxy(object): # pylint: disable=R0902
indevmac
=
self
.
get_iface_hw_addr
(
binding
.
indev
)
ifll
=
subnet
.
make_ll64
(
indevmac
)
if
ifll
is
None
:
return
if
not
(
subnet
.
net
.
overlaps
(
ns
.
tgt
)
or
str
(
ns
.
tgt
)
==
str
(
ifll
)):
logging
.
debug
(
"Received NS for a non-routable IP (%s)"
,
ns
.
tgt
)
...
...
@@ -783,6 +789,8 @@ class VMNetProxy(object): # pylint: disable=R0902
continue
indevmac
=
self
.
get_iface_hw_addr
(
indev
)
ifll
=
subnet
.
make_ll64
(
indevmac
)
if
ifll
is
None
:
continue
resp
=
Ether
(
src
=
indevmac
)
/
\
IPv6
(
src
=
str
(
ifll
))
/
ICMPv6ND_RA
(
routerlifetime
=
14400
)
/
\
ICMPv6NDOptPrefixInfo
(
prefix
=
str
(
subnet
.
prefix
),
...
...
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