Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
445
Issues
445
List
Boards
Labels
Service Desk
Milestones
Merge Requests
71
Merge Requests
71
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
4ba24504
Commit
4ba24504
authored
Sep 30, 2014
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Plain Diff
[master] Merge branch 'nchaigne-master' (Github
#1
)
parents
59159417
0d966bce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/lib/dhcp/pkt_filter_inet.cc
src/lib/dhcp/pkt_filter_inet.cc
+3
-3
No files found.
src/lib/dhcp/pkt_filter_inet.cc
View file @
4ba24504
...
...
@@ -226,9 +226,8 @@ PktFilterInet::send(const Iface&, uint16_t sockfd,
// Setting the interface is a bit more involved.
//
// We have to create a "control message", and set that to
// define the IPv4 packet information. We could set the
// source address if we wanted, but we can safely let the
// kernel decide what that should be.
// define the IPv4 packet information. We set the source address
// to handle correctly interfaces with multiple addresses.
m
.
msg_control
=
&
control_buf_
[
0
];
m
.
msg_controllen
=
control_buf_len_
;
struct
cmsghdr
*
cmsg
=
CMSG_FIRSTHDR
(
&
m
);
...
...
@@ -238,6 +237,7 @@ PktFilterInet::send(const Iface&, uint16_t sockfd,
struct
in_pktinfo
*
pktinfo
=
(
struct
in_pktinfo
*
)
CMSG_DATA
(
cmsg
);
memset
(
pktinfo
,
0
,
sizeof
(
struct
in_pktinfo
));
pktinfo
->
ipi_ifindex
=
pkt
->
getIndex
();
pktinfo
->
ipi_spec_dst
.
s_addr
=
htonl
(
pkt
->
getLocalAddr
());
// set the source IP address
m
.
msg_controllen
=
CMSG_SPACE
(
sizeof
(
struct
in_pktinfo
));
#endif
...
...
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