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
d2c81e80
Commit
d2c81e80
authored
Aug 06, 2012
by
Dimitris Aragiorgis
Browse files
Add nice debug messages for nfdhcpd clients
Signed-off-by:
Dimitris Aragiorgis
<
dimara@grnet.gr
>
parent
40ce9ea2
Changes
1
Hide whitespace changes
Inline
Side-by-side
nfdhcpd
View file @
d2c81e80
...
...
@@ -449,18 +449,22 @@ class VMNetProxy(object): # pylint: disable=R0902
tap
=
os
.
path
.
basename
(
path
)
logging
.
debug
(
"Updating configuration for %s"
,
tap
)
b
inding
=
parse_binding_file
(
path
)
if
b
inding
is
None
:
b
=
parse_binding_file
(
path
)
if
b
is
None
:
return
ifindex
=
self
.
get_ifindex
(
b
inding
.
tap
)
ifindex
=
self
.
get_ifindex
(
b
.
tap
)
if
ifindex
is
None
:
logging
.
warn
(
"Stale configuration for %s found"
,
tap
)
else
:
if
binding
.
is_valid
():
self
.
clients
[
binding
.
mac
]
=
binding
logging
.
debug
(
"Added client %s on %s"
,
binding
.
hostname
,
tap
)
logging
.
debug
(
"clients %s"
,
self
.
clients
.
keys
())
if
b
.
is_valid
():
self
.
clients
[
b
.
mac
]
=
b
logging
.
debug
(
"Added client:"
)
logging
.
debug
(
"%10s %20s %7s %15s"
,
b
.
hostname
,
b
.
mac
,
b
.
tap
,
b
.
ip
)
logging
.
debug
(
"%10s %20s %7s %15s"
,
'Client'
,
'MAC'
,
'TAP'
,
'IP'
)
for
mac
in
self
.
clients
.
keys
():
b
=
self
.
clients
[
mac
]
logging
.
debug
(
"%10s %20s %7s %15s"
,
b
.
hostname
,
b
.
mac
,
b
.
tap
,
b
.
ip
)
def
remove_tap
(
self
,
tap
):
""" Cleanup clients on a removed interface
...
...
@@ -468,9 +472,11 @@ class VMNetProxy(object): # pylint: disable=R0902
"""
for
b
in
self
.
clients
.
values
():
if
b
.
tap
==
tap
:
#os.remove(self.data_path+'/'+tap)
logging
.
debug
(
"Removed interface %s"
,
self
.
data_path
+
'/'
+
tap
)
logging
.
debug
(
"%10s %20s %7s %15s"
,
b
.
hostname
,
b
.
mac
,
b
.
tap
,
b
.
ip
)
del
b
logging
.
debug
(
"Removed interface %s"
,
tap
)
def
dhcp_response
(
self
,
i
,
payload
):
# pylint: disable=W0613,R0914
""" Generate a reply to bnetfilter-queue-deva BOOTP/DHCP request
...
...
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