From: INSUN PYO Date: Mon, 24 Feb 2020 05:06:30 +0000 (+0900) Subject: Removed "route add" in rndis usb mode X-Git-Tag: accepted/tizen/unified/20200225.224439~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e0411aa7b79261fc314a53dc03fa6a4a297c7ab;p=platform%2Fcore%2Fsystem%2Fdeviced.git Removed "route add" in rndis usb mode Ifconfig command will also automatically add route information to the routing table in the kernel. So if you run "route add" additionally, you have duplicate routing table entries. sh-3.2# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0 cns1.sec.samsun 192.168.0.1 255.255.255.255 UGH 0 0 0 wlan0 cns2.sec.samsun 192.168.0.1 255.255.255.255 UGH 0 0 0 wlan0 192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0 192.168.0.1 * 255.255.255.255 UH 0 0 0 wlan0 192.168.129.0 * 255.255.255.0 U 0 0 0 usb0 <== here 192.168.129.0 * 255.255.255.0 U 0 0 0 usb0 <== here Change-Id: I96c290ce5de1da81ff7b9f99cfaefc8a64b618ac --- diff --git a/scripts/rndis.sh b/scripts/rndis.sh index eb38cdb..66f8294 100755 --- a/scripts/rndis.sh +++ b/scripts/rndis.sh @@ -24,21 +24,12 @@ else fi ######################################################################################### -IP1=`echo $IP_ADDR | cut -d"." -f1` -IP2=`echo $IP_ADDR | cut -d"." -f2` -IP3=`echo $IP_ADDR | cut -d"." -f3` -NETWORK=$IP1"."$IP2"."$IP3"."0 - -######################################################################################### echo "rndis network inteface =" $IFNAME echo "rndis ip address =" $IP_ADDR -echo "rndis network =" $NETWORK if [ x$1 == "xstart" ] then /sbin/ifconfig $IFNAME $IP_ADDR up - /sbin/route add -net $NETWORK netmask 255.255.255.0 dev $IFNAME else - /sbin/route del -net $NETWORK netmask 255.255.255.0 dev $IFNAME /sbin/ifconfig $IFNAME down fi