- Resolves: rhbz#1562512 kernels 4.15 and 4.16 break xl2tpd

epel9
Paul Wouters 7 years ago
parent cfcbc4e311
commit f60905f0f4

@ -1,7 +1,8 @@
diff -Naur xl2tpd-1.3.8-orig/file.c xl2tpd-1.3.8/file.c diff --git a/file.c b/file.c
--- xl2tpd-1.3.8-orig/file.c 2016-08-11 20:56:53.000000000 -0400 index f61c221..a6362c0 100644
+++ xl2tpd-1.3.8/file.c 2016-08-24 11:46:12.046031065 -0400 --- a/file.c
@@ -42,6 +42,8 @@ +++ b/file.c
@@ -42,6 +42,8 @@ int init_config ()
gconfig.port = UDP_LISTEN_PORT; gconfig.port = UDP_LISTEN_PORT;
gconfig.sarefnum = IP_IPSEC_REFINFO; /* default use the latest we know */ gconfig.sarefnum = IP_IPSEC_REFINFO; /* default use the latest we know */
@ -10,27 +11,49 @@ diff -Naur xl2tpd-1.3.8-orig/file.c xl2tpd-1.3.8/file.c
gconfig.listenaddr = htonl(INADDR_ANY); /* Default is to bind (listen) to all interfaces */ gconfig.listenaddr = htonl(INADDR_ANY); /* Default is to bind (listen) to all interfaces */
gconfig.debug_avp = 0; gconfig.debug_avp = 0;
gconfig.debug_network = 0; gconfig.debug_network = 0;
diff -Naur xl2tpd-1.3.8-orig/network.c xl2tpd-1.3.8/network.c diff --git a/network.c b/network.c
--- xl2tpd-1.3.8-orig/network.c 2016-08-11 20:56:53.000000000 -0400 index 543d30e..c66d1e3 100644
+++ xl2tpd-1.3.8/network.c 2016-08-24 11:47:01.683781479 -0400 --- a/network.c
@@ -80,6 +80,12 @@ +++ b/network.c
@@ -78,23 +78,27 @@ int init_network (void)
* For L2TP/IPsec with KLIPSng, set the socket to receive IPsec REFINFO * For L2TP/IPsec with KLIPSng, set the socket to receive IPsec REFINFO
* values. * values.
*/ */
- arg=1;
- if(setsockopt(server_socket, IPPROTO_IP, gconfig.sarefnum,
- &arg, sizeof(arg)) != 0) {
- l2tp_log(LOG_CRIT, "setsockopt recvref[%d]: %s\n", gconfig.sarefnum, strerror(errno));
-
- gconfig.ipsecsaref=0;
- }
-
- arg=1;
- if(setsockopt(server_socket, IPPROTO_IP, IP_PKTINFO, (char*)&arg, sizeof(arg)) != 0) {
- l2tp_log(LOG_CRIT, "setsockopt IP_PKTINFO: %s\n", strerror(errno));
+ if (!gconfig.ipsecsaref) + if (!gconfig.ipsecsaref)
+ { + {
+ l2tp_log (LOG_INFO, "Not looking for kernel SAref support.\n"); + l2tp_log (LOG_INFO, "Not looking for kernel SAref support.\n");
+ } }
-#else
+ else + else
+ { {
arg=1; - l2tp_log(LOG_INFO, "No attempt being made to use IPsec SAref's since we're not on a Linux machine.\n");
if(setsockopt(server_socket, IPPROTO_IP, gconfig.sarefnum, + arg=1;
&arg, sizeof(arg)) != 0) { + if(setsockopt(server_socket, IPPROTO_IP, gconfig.sarefnum, &arg, sizeof(arg)) != 0) {
@@ -87,6 +93,7 @@ + l2tp_log(LOG_CRIT, "setsockopt recvref[%d]: %s\n", gconfig.sarefnum, strerror(errno));
+ gconfig.ipsecsaref=0;
gconfig.ipsecsaref=0; + }
+ else
+ {
+ arg=1;
+ if(setsockopt(server_socket, IPPROTO_IP, IP_PKTINFO, (char*)&arg, sizeof(arg)) != 0) {
+ l2tp_log(LOG_CRIT, "setsockopt IP_PKTINFO: %s\n", strerror(errno));
+ }
+ }
} }
+ } -
+#else
+ l2tp_log(LOG_INFO, "No attempt being made to use IPsec SAref's since we're not on a Linux machine.\n");
#endif
arg=1; #ifdef USE_KERNEL
if(setsockopt(server_socket, IPPROTO_IP, IP_PKTINFO, (char*)&arg, sizeof(arg)) != 0) {

@ -3,7 +3,7 @@
Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661) Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
Name: xl2tpd Name: xl2tpd
Version: 1.3.8 Version: 1.3.8
Release: 6%{?dist} Release: 7%{?dist}
License: GPL+ License: GPL+
Url: https://github.com/xelerance/xl2tpd/ Url: https://github.com/xelerance/xl2tpd/
Group: System Environment/Daemons Group: System Environment/Daemons
@ -116,6 +116,9 @@ install -p -D -m755 -d %{buildroot}%{_localstatedir}/run/xl2tpd
%ghost %attr(0600,root,root) %{_localstatedir}/run/xl2tpd/l2tp-control %ghost %attr(0600,root,root) %{_localstatedir}/run/xl2tpd/l2tp-control
%changelog %changelog
* Sun Apr 01 2018 Paul Wouters <pwouters@redhat.com> - 1.3.8-7
- Resolves: rhbz#1562512 kernels 4.15 and 4.16 break xl2tpd
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-6 * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save