Ask Your Question
0

RTNETLINK error [closed]

asked 2017-10-06 09:47:58 -0500

MaoTao gravatar image

updated 2017-10-06 12:20:18 -0500

Hi, i' m using the Wondershaper script for a long time now with no issues. After the last kernel update to 4.13.4-200.fc26.x86_64, if i try to activate the script i get the following error message:

RTNETLINK answers: Invalid argument
We have an error talking to the kernel

After a search with the above error, i noticed that it has to do usually with cases of static IP configuration. I haven't changed anything to my IP settings, and still use DHCP. I checked the IP/subnet mask/default gateway/DNS and all look correct from a math point of view.

I did reset the modem, it leased to me an new IP, but still i get the same issues.

-Edit-

I rolled to the previous kernel 4.12.14-300.fc26.x86_64 and all works fine.

Here is the script as requested

#!/bin/bash 

# Wonder Shaper

function show_help {
  echo "Wonder Shaper 1.2.1"
  echo
  echo "Usage: $0 [device] clean|[upload speed in Kb/s] [download speed in Kb/s]"
  echo "Example: $0 eth0 20 500"
  echo
  echo "https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=wondershaper"
  exit
}

if [ $# -eq 0 ]; then
    show_help;
fi

if [ $# -eq 1 ]; then
  tc -s qdisc ls dev $1
  tc -s class ls dev $1
  exit
fi

if [ $# -eq 2 ]; then
  tc qdisc del dev $2 root    2> /dev/null > /dev/null
  tc qdisc del dev $2 ingress 2> /dev/null > /dev/null
  echo Wondershaper queues have been cleared.
  exit
fi

if [ $# -ne 3 ]; then
    show_help;
fi

# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobits. Also set the device that is to be shaped.
DOWNLINK=$3
UPLINK=$2
DEV=$1

# low priority OUTGOING traffic - you can leave this blank if you want
# low priority source netmasks
NOPRIOHOSTSRC=

# low priority destination netmasks
NOPRIOHOSTDST=

# low priority source ports
NOPRIOPORTSRC=

# low priority destination ports
NOPRIOPORTDST=

#########################################################

# clean existing down- and uplink qdiscs, hide errors
tc qdisc del dev $DEV root    2> /dev/null > /dev/null
tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null

if [ "$1" = "stop" ] 
then 
    exit
fi

###### uplink

# install root CBQ

tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit 

# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroy latency:
# main class

tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit \
allot 1500 prio 5 bounded isolated 

# high prio class 1:10:

tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit \
   allot 1600 prio 1 avpkt 1000

# bulk and default class 1:20 - gets slightly less traffic, 
#  and a lower priority:

tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit \
   allot 1600 prio 2 avpkt 1000

# 'traffic we hate'

tc class add dev $DEV parent 1:1 classid 1:30 cbq rate $[8*$UPLINK/10]kbit \
   allot 1600 prio 2 avpkt 1000

# all ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by MaoTao
close date 2017-10-12 06:47:53.878765

Comments

Under the new kernel version 4.13.5-200.fc26.x86_64 i get the same erro/warnings. But after typing echo $? it returns 0, meaning that the script did the configuration. I tested it with downloading a large file over http. The downloading speed was the the correct as configured. So i' m closing this, since it seems that it works, and error/warning has to do with something else.

MaoTao gravatar imageMaoTao ( 2017-10-12 06:47:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-06 09:59:08 -0500

Hi there,

Are the error happening with all the scripts? If the error occurs with only one script, can you please share the script?

Thanks.

edit flag offensive delete link more

Comments

I updated with the script. Or the new kernel is "buggy" and have to wait for some update, or there something drastically changed to networking in the kernel with 4.13 version.

MaoTao gravatar imageMaoTao ( 2017-10-06 12:22:02 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-10-06 09:47:58 -0500

Seen: 154 times

Last updated: Oct 06 '17