pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kea: Solaris/illumos uses IP_PKTINFO just line linux
Module Name: pkgsrc-wip
Committed By: Niclas Rosenvik <nros%netbsd.org@localhost>
Pushed By: nros
Date: Wed Jan 1 12:04:00 2020 +0000
Changeset: d7fbc32e598d4ded3de6402430919a8e1b4e6829
Modified Files:
kea/distinfo
Added Files:
kea/patches/patch-src_lib_dhcp_pkt__filter__inet.cc
Log Message:
kea: Solaris/illumos uses IP_PKTINFO just line linux
ip_pktinfo is supported in illumos/Solaris , make sure code paths using
this is enabled on solaris as well.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d7fbc32e598d4ded3de6402430919a8e1b4e6829
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
kea/distinfo | 1 +
.../patch-src_lib_dhcp_pkt__filter__inet.cc | 35 ++++++++++++++++++++++
2 files changed, 36 insertions(+)
diffs:
diff --git a/kea/distinfo b/kea/distinfo
index 41f4490626..1368d813d1 100644
--- a/kea/distinfo
+++ b/kea/distinfo
@@ -14,6 +14,7 @@ SHA1 (patch-src_bin_keactrl_Makefile.am) = 5b6fd816da6011858d1167d297c83eda7947e
SHA1 (patch-src_bin_netconf_netconf__lexer.ll) = ec316d436f791470df9dd5c106c76f3026a19b0e
SHA1 (patch-src_lib_dhcp_Makefile.am) = 452036d0100a85f41c52562292931bea2501e396
SHA1 (patch-src_lib_dhcp_iface__mgr__sun.cc) = 7bf79c4a24b3c074f8cf53b79fc83ae8255f63d7
+SHA1 (patch-src_lib_dhcp_pkt__filter__inet.cc) = 979ca0bd1d87bdaf3bf54b3e11b18fef72ecc860
SHA1 (patch-src_lib_dhcpsrv_Makefile.am) = bdd2be227d8c7f34b4329092e6de3bcaa7117284
SHA1 (patch-src_lib_dhcpsrv_host__data__source__factory.cc) = a1bc71ec40b9eb5a6c9247360a84ce480521cad2
SHA1 (patch-src_lib_util_encode_base__n.cc) = 61bf8402e4baf0578a7ec9444f396a9b6c69d87d
diff --git a/kea/patches/patch-src_lib_dhcp_pkt__filter__inet.cc b/kea/patches/patch-src_lib_dhcp_pkt__filter__inet.cc
new file mode 100644
index 0000000000..b084e4b776
--- /dev/null
+++ b/kea/patches/patch-src_lib_dhcp_pkt__filter__inet.cc
@@ -0,0 +1,35 @@
+$NetBSD$
+* illumos uses ip_pktinfo just like linux
+--- src/lib/dhcp/pkt_filter_inet.cc.orig 2019-11-19 14:50:43.000000000 +0000
++++ src/lib/dhcp/pkt_filter_inet.cc
+@@ -86,9 +86,9 @@ PktFilterInet::openSocket(Iface& iface,
+ << "/port=" << port);
+ }
+
+- // On Linux systems IP_PKTINFO socket option is supported. This
+- // option is used to retrieve destination address of the packet.
+-#if defined (IP_PKTINFO) && defined (OS_LINUX)
++ // On Linux and Solaris systems IP_PKTINFO socket option is supported.
++ // This option is used to retrieve destination address of the packet.
++#if defined (IP_PKTINFO) && (defined (OS_LINUX) || defined (OS_SOLARIS))
+ int flag = 1;
+ if (setsockopt(sock, IPPROTO_IP, IP_PKTINFO, &flag, sizeof(flag)) != 0) {
+ close(sock);
+@@ -167,7 +167,7 @@ PktFilterInet::receive(Iface& iface, con
+ // 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)
++#if defined (IP_PKTINFO) && (defined (OS_LINUX) || defined (OS_SOLARIS))
+ struct in_pktinfo* pktinfo;
+ struct cmsghdr* cmsg = CMSG_FIRSTHDR(&m);
+
+@@ -243,7 +243,7 @@ PktFilterInet::send(const Iface&, uint16
+ // In the future the OS-specific code may be abstracted to a different
+ // file but for now we keep it here because there is no code yet, which
+ // is specific to non-Linux systems.
+-#if defined (IP_PKTINFO) && defined (OS_LINUX)
++#if defined (IP_PKTINFO) && (defined (OS_LINUX) || defined (OS_SOLARIS))
+ // Setting the interface is a bit more involved.
+ //
+ // We have to create a "control message", and set that to
Home |
Main Index |
Thread Index |
Old Index