summaryrefslogtreecommitdiff
path: root/net/smcroute/files/patch-mroute-api.c
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2025-06-13 08:20:55 +0900
committerHiroki Sato <hrs@FreeBSD.org>2025-06-13 08:21:26 +0900
commit511a3978bbcef3c00ec1b45cdf358b6e95980c69 (patch)
tree25260cd50d32371c16a025ebfa86312306354cc4 /net/smcroute/files/patch-mroute-api.c
parentsecurity/p5-IO-Socket-SSL: Update 2.090 => 2.091 (diff)
net/smcroute: Update to 2.5.7
Diffstat (limited to 'net/smcroute/files/patch-mroute-api.c')
-rw-r--r--net/smcroute/files/patch-mroute-api.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/net/smcroute/files/patch-mroute-api.c b/net/smcroute/files/patch-mroute-api.c
deleted file mode 100644
index 8158d37c136a..000000000000
--- a/net/smcroute/files/patch-mroute-api.c
+++ /dev/null
@@ -1,55 +0,0 @@
---- mroute-api.c.orig 2016-02-17 21:02:06 UTC
-+++ mroute-api.c
-@@ -98,13 +98,26 @@ int mroute4_enable(void)
- unsigned int i;
- struct iface *iface;
-
-+#ifdef SOCK_CLOEXEC
- mroute4_socket = socket(AF_INET, SOCK_RAW | SOCK_CLOEXEC, IPPROTO_IGMP);
-+#else
-+ mroute4_socket = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP);
-+#endif
- if (mroute4_socket < 0) {
- if (ENOPROTOOPT == errno)
- smclog(LOG_WARNING, "Kernel does not support IPv4 multicast routing, skipping ...");
-
- return -1;
- }
-+#ifndef SOCK_CLOEXEC
-+ if (fcntl(mroute4_socket, F_SETFD, FD_CLOEXEC) < 0) {
-+ smclog(LOG_INIT, "Failed initializing IPv4 multicast routing API: %m");
-+ close(mroute4_socket);
-+ mroute4_socket = -1;
-+
-+ return -1;
-+ }
-+#endif
-
- if (setsockopt(mroute4_socket, IPPROTO_IP, MRT_INIT, (void *)&arg, sizeof(arg))) {
- switch (errno) {
-@@ -472,12 +485,25 @@ int mroute6_enable(void)
- unsigned int i;
- struct iface *iface;
-
-+#ifdef SOCK_CLOEXEC
- if ((mroute6_socket = socket(AF_INET6, SOCK_RAW | SOCK_CLOEXEC, IPPROTO_ICMPV6)) < 0) {
-+#else
-+ if ((mroute6_socket = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) {
-+#endif
- if (ENOPROTOOPT == errno)
- smclog(LOG_WARNING, "Kernel does not support IPv6 multicast routing, skipping ...");
-
- return -1;
- }
-+#ifndef SOCK_CLOEXEC
-+ if (fcntl(mroute6_socket, F_SETFD, FD_CLOEXEC) < 0) {
-+ smclog(LOG_INIT, "Failed initializing IPv6 multicast routing API: %m");
-+ close(mroute6_socket);
-+ mroute6_socket = -1;
-+
-+ return -1;
-+ }
-+#endif
- if (setsockopt(mroute6_socket, IPPROTO_IPV6, MRT6_INIT, (void *)&arg, sizeof(arg))) {
- switch (errno) {
- case EADDRINUSE: