Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
93ab4a40
Commit
93ab4a40
authored
Sep 09, 2016
by
Marcin Siodelski
Browse files
[master] Silenced cppcheck warning about unread variable.
This change was okayed on jabber.
parent
69191330
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcp/pkt_filter_inet.cc
View file @
93ab4a40
...
...
@@ -162,14 +162,13 @@ PktFilterInet::receive(Iface& iface, const SocketInfo& socket_info) {
pkt
->
setRemotePort
(
from_port
);
pkt
->
setLocalPort
(
socket_info
.
port_
);
struct
cmsghdr
*
cmsg
;
cmsg
=
CMSG_FIRSTHDR
(
&
m
);
// Linux systems support IP_PKTINFO option which is used to retrieve the
// destination address of the received packet. On BSD systems IP_RECVDSTADDR
// is used instead.
#if defined (IP_PKTINFO) && defined (OS_LINUX)
struct
in_pktinfo
*
pktinfo
;
struct
cmsghdr
*
cmsg
=
CMSG_FIRSTHDR
(
&
m
);
while
(
cmsg
!=
NULL
)
{
if
((
cmsg
->
cmsg_level
==
IPPROTO_IP
)
&&
(
cmsg
->
cmsg_type
==
IP_PKTINFO
))
{
...
...
@@ -192,6 +191,7 @@ PktFilterInet::receive(Iface& iface, const SocketInfo& socket_info) {
#elif defined (IP_RECVDSTADDR) && defined (OS_BSD)
struct
in_addr
*
to_addr
;
struct
cmsghdr
*
cmsg
=
CMSG_FIRSTHDR
(
&
m
);
while
(
cmsg
!=
NULL
)
{
if
((
cmsg
->
cmsg_level
==
IPPROTO_IP
)
&&
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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