Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
23fa0135
Commit
23fa0135
authored
Apr 05, 2013
by
Marcin Siodelski
Browse files
[991] Eliminated the warning about unused variable.
parent
21ef42e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcp/pkt_filter_inet.cc
View file @
23fa0135
...
...
@@ -28,12 +28,24 @@ PktFilterInet::PktFilterInet()
{
}
int
PktFilterInet
::
openSocket
(
const
Iface
&
iface
,
const
isc
::
asiolink
::
IOAddress
&
addr
,
const
uint16_t
port
,
const
bool
receive_bcast
,
const
bool
send_bcast
)
{
// iface is only used when SO_BINDTODEVICE is defined and thus
// the code section using this variable is compiled.
#ifdef SO_BINDTODEVICE
int
PktFilterInet
::
openSocket
(
const
Iface
&
iface
,
const
isc
::
asiolink
::
IOAddress
&
addr
,
const
uint16_t
port
,
const
bool
receive_bcast
,
const
bool
send_bcast
)
{
#else
int
PktFilterInet
::
openSocket
(
const
Iface
&
,
const
isc
::
asiolink
::
IOAddress
&
addr
,
const
uint16_t
port
,
const
bool
receive_bcast
,
const
bool
send_bcast
)
{
#endif
struct
sockaddr_in
addr4
;
memset
(
&
addr4
,
0
,
sizeof
(
sockaddr
));
...
...
@@ -152,6 +164,7 @@ PktFilterInet::receive(const Iface& iface, const SocketInfo& socket_info) {
memset
(
&
to_addr
,
0
,
sizeof
(
to_addr
));
#ifdef IP_PKTINFO
cmsg
=
CMSG_FIRSTHDR
(
&
m
);
while
(
cmsg
!=
NULL
)
{
if
((
cmsg
->
cmsg_level
==
IPPROTO_IP
)
&&
...
...
@@ -172,6 +185,7 @@ PktFilterInet::receive(const Iface& iface, const SocketInfo& socket_info) {
}
cmsg
=
CMSG_NXTHDR
(
&
m
,
cmsg
);
}
#endif
return
(
pkt
);
}
...
...
Write
Preview
Supports
Markdown
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