dtaht / ceropackages-3.10

OpenWRT package repository for Cerowrt
http://www.bufferbloat.net/projects/cerowrt/wiki
25 stars 19 forks source link

sqm-scripts: ip link add: keyword "name" needed? #9

Closed hnyman closed 9 years ago

hnyman commented 9 years ago

When I tried the last change to sqm (https://github.com/dtaht/ceropackages-3.10/commit/8e42148c5f6456928d712c5e70d35d7e28ea2115#diff-c0e2726c9acd18d9adb638d16edc764eR128) in my Openwrt build for ar71xx (trunk Chaos Calmer, based on kernel 3.10.49), the script choked on the creation of the new ifb (line 128).

The command "ip link add" seems to require the "name" keyword before the name of the ifb being created.

root@OpenWrt:/# ls -d /sys/devices/virtual/net/ifb /sys/devices/virtual/net/ifb0 root@OpenWrt:/# ip link add ifb4eth1 type ifb Error: argument "ifb4eth1" is wrong: Unknown device root@OpenWrt:/# ip link add name ifb4eth1 type ifb root@OpenWrt:/# ls -d /sys/devices/virtual/net/ifb /sys/devices/virtual/net/ifb0 /sys/devices/virtual/net/ifb4eth1

moeller0 commented 9 years ago

Hi Hnyman,

thanks for the information and fix!

On Oct 9, 2014, at 16:16 , hnyman notifications@github.com wrote:

When I tried the last change to sqm (8e42148#diff-c0e2726c9acd18d9adb638d16edc764eR128) in my Openwrt build for ar71xx (based on kernel 3.10.49), the script choked on the creation of the new ifb (line 128).

The command "ip link add" seems to require the "name" keyword before the name of the ifb being created.

root@OpenWrt:/# ls -d /sys/devices/virtual/net/ifb /sys/devices/virtual/net/ifb0 root@OpenWrt:/# ip link add ifb4eth1 type ifb Error: argument "ifb4eth1" is wrong: Unknown device root@OpenWrt:/# ip link add name ifb4eth1 type ifb root@OpenWrt:/# ls -d /sys/devices/virtual/net/ifb /sys/devices/virtual/net/ifb0 /sys/devices/virtual/net/ifb4eth1

— Reply to this email directly or view it on GitHub.

Waho that is fast, I just saw an e-mail on openwrt-devel to that regard and thought about checking this tonight ;) I will test this tonight (just to make sure this also holds true for cerowrt’s ip binary) and check it in the SQM repo (unless someone else beats me to it). The ip-link man page makes it look like “name” is optional so this might be a temporary change in the ip binary (or the man-page might have bit rotted), Anyway I will fix this later….

Best Regards Sebastian=

moeller0 commented 9 years ago

Helle Hnyman,

On Oct 9, 2014, at 16:16 , hnyman notifications@github.com wrote:

When I tried the last change to sqm (8e42148#diff-c0e2726c9acd18d9adb638d16edc764eR128) in my Openwrt build for ar71xx (based on kernel 3.10.49), the script choked on the creation of the new ifb (line 128).

The command "ip link add" seems to require the "name" keyword before the name of the ifb being created.

root@OpenWrt:/# ls -d /sys/devices/virtual/net/ifb /sys/devices/virtual/net/ifb0 root@OpenWrt:/# ip link add ifb4eth1 type ifb Error: argument "ifb4eth1" is wrong: Unknown device root@OpenWrt:/# ip link add name ifb4eth1 type ifb root@OpenWrt:/# ls -d /sys/devices/virtual/net/ifb /sys/devices/virtual/net/ifb0 /sys/devices/virtual/net/ifb4eth1

— Reply to this email directly or view it on GitHub.

As expected that change works well with cerowrt’ 3.10.50-1’s ip binary, so checked in… (Note I will need to overhaul the stop routine in the near future as currently proper clean up is only performed if the user first deselects the “enable” checkbox followed by a “save & apply” before changing the interface name; otherwise there are left overs from the previous config…)

Best Regards Sebastian