From f2ae2ec7919c313c2167f05c0e58789045f142eb Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Wed, 4 Oct 2017 13:30:24 +0200 Subject: [PATCH] Replace route with appropriate command from iproute --- openslp-2.0.0-multicast-set.patch | 8 +++++--- openslp.spec | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/openslp-2.0.0-multicast-set.patch b/openslp-2.0.0-multicast-set.patch index 2d7c60b..4bd1a07 100644 --- a/openslp-2.0.0-multicast-set.patch +++ b/openslp-2.0.0-multicast-set.patch @@ -1,6 +1,6 @@ diff -up openslp-2.0.0/etc/slpd.all_init.orig openslp-2.0.0/etc/slpd.all_init --- openslp-2.0.0/etc/slpd.all_init.orig 2012-11-28 18:07:04.000000000 +0100 -+++ openslp-2.0.0/etc/slpd.all_init 2017-10-04 09:59:28.920071865 +0200 ++++ openslp-2.0.0/etc/slpd.all_init 2017-10-04 12:50:36.672953246 +0200 @@ -1,28 +1,5 @@ #!/bin/bash -# @@ -31,15 +31,17 @@ diff -up openslp-2.0.0/etc/slpd.all_init.orig openslp-2.0.0/etc/slpd.all_init multicast_route_set() { PING_OPTIONS_1='-c1 -w1' -@@ -36,7 +13,7 @@ multicast_route_set() +@@ -36,8 +13,8 @@ multicast_route_set() MSG_FAILED_TO_ADD=' FAILED - Route NOT Added.' MSG_SUCCES_ON_ADD=' SUCCESS - Route Added.' - CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1}'" +- CMD_ADD_ROUTE="route add -net 224.0.0.0 netmask 240.0.0.0" + CMD_GET_INTERFACE="ip -o link show | awk 'BEGIN{FS=\": \"}!/^:digit:+: lo:.*/{print \$2}'" - CMD_ADD_ROUTE="route add -net 224.0.0.0 netmask 240.0.0.0" ++ CMD_ADD_ROUTE="ip route add 224.0.0.0/4 dev" err_unreachable_found=`ping $PING_OPTIONS_1 $MULTICAST_ADDRESS 2>&1 1>/dev/null` + @@ -91,94 +68,11 @@ multicast_route_set() return $retval } diff --git a/openslp.spec b/openslp.spec index b918771..beef84f 100644 --- a/openslp.spec +++ b/openslp.spec @@ -2,7 +2,7 @@ Summary: Open implementation of Service Location Protocol V2 Name: openslp Version: 2.0.0 -Release: 15%{?dist} +Release: 16%{?dist} License: BSD URL: http://sourceforge.net/projects/openslp/ @@ -173,6 +173,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Oct 04 2017 Vitezslav Crhonek - 2.0.0-16 +- Replace route with appropriate command from iproute + Related: #1496138 + * Wed Oct 04 2017 Vitezslav Crhonek - 2.0.0-15 - Removed dependency on net-tools Resolves: #1496138