Message ID | 20180120180542.20896-1-tim@tn-x.org |
---|---|
State | Deferred |
Headers | show |
diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile index 348897d..6700682 100644 --- a/src/packages/fff/fff-network/Makefile +++ b/src/packages/fff/fff-network/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-network -PKG_VERSION:=10 +PKG_VERSION:=11 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) CATEGORY:=Freifunk TITLE:= Freifunk-Franken network configuration URL:=http://www.freifunk-franken.de - DEPENDS:=+fff-uradvd +fff-boardname + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy endef define Package/$(PKG_NAME)/description diff --git a/src/packages/fff/fff-network/files/etc/config/network b/src/packages/fff/fff-network/files/etc/config/network index 08a897b..6ee3443 100644 --- a/src/packages/fff/fff-network/files/etc/config/network +++ b/src/packages/fff/fff-network/files/etc/config/network @@ -4,9 +4,15 @@ config interface 'loopback' option ipaddr '127.0.0.1' option netmask '255.0.0.0' +config interface 'dummy' + option proto 'dummy' + config interface 'mesh' option type 'bridge' + option ifname 'dummy0' option auto '1' + option bridge_empty '1' + option force_link '1' config interface 'wan' option proto 'dhcp' diff --git a/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh new file mode 100755 index 0000000..8cb9994 --- /dev/null +++ b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +. /lib/functions.sh +. ../netifd-proto.sh +init_proto "$@" + +proto_dummy_setup() { + local config="$1" + local iface="$2" + + ip link add "$iface" type dummy + + proto_init_update "$iface" 1 + proto_send_update "$config" +} + +proto_dummy_teardown() { + local config="$1" + local iface="$2" + + ip link delete dev "$iface" +} + +add_protocol dummy diff --git a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork index f318d8e..51a3487 100755 --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > /dev/null || [ "$FORCEPARSE" = '1' ] ; then uci set network.${SWITCHDEV}_3.vlan=3 uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" uci set network.ethmesh.ifname="$SWITCHDEV.3" @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get network.$SWITCHDEV.ifname || [ "$FO echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf - uci set network.mesh.ifname="bat0" + uci set network.mesh.ifname="dummy0 bat0" uci set network.wan.ifname="$WANDEV" uci del uci set network.ethmesh.ifname uci del network.eth0.macaddr @@ -140,7 +140,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get network.$SWITCHDEV.ifname || [ "$FO echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> /etc/sysctl.conf echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> /etc/sysctl.conf - uci set network.mesh.ifname="bat0 $SWITCHDEV" + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" uci set network.wan.ifname="eth1" #eth1 because it is default in config file uci del network.ethmesh.ifname uci del network.eth0.macaddr @@ -149,7 +149,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get network.$SWITCHDEV.ifname || [ "$FO echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> /etc/sysctl.conf echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> /etc/sysctl.conf - uci set network.mesh.ifname="bat0" + uci set network.mesh.ifname="dummy0 bat0" uci set network.wan.ifname="eth1" #eth1 because it is default in config file uci set network.ethmesh.ifname="$SWITCHDEV" ETH0MAC="w2ap"
Hallo Tim, ich schaus mir später genauer an. Was mich aber in jedem Fall interessiert sind die Vor- und Nachteile gegenüber meiner Lösung des Problems. Beste Grüße Adrian > -----Original Message----- > From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf > Of Tim Niemeyer > Sent: Samstag, 20. Januar 2018 19:06 > To: franken-dev@freifunk.net > Subject: [PATCH] fff-network: add dummy iface to force bridge to up > > Fixes #78 > > Signed-off-by: Tim Niemeyer <tim@tn-x.org> > --- > > src/packages/fff/fff-network/Makefile | 4 ++-- > .../fff/fff-network/files/etc/config/network | 6 ++++++ > .../fff-network/files/lib/netifd/proto/dummy.sh | 24 > ++++++++++++++++++++++ > .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- > 4 files changed, 36 insertions(+), 6 deletions(-) create mode 100755 > src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff- > network/Makefile > index 348897d..6700682 100644 > --- a/src/packages/fff/fff-network/Makefile > +++ b/src/packages/fff/fff-network/Makefile > @@ -1,7 +1,7 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=fff-network > -PKG_VERSION:=10 > +PKG_VERSION:=11 > PKG_RELEASE:=1 > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) > CATEGORY:=Freifunk > TITLE:= Freifunk-Franken network configuration > URL:=http://www.freifunk-franken.de > - DEPENDS:=+fff-uradvd +fff-boardname > + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy > endef > > define Package/$(PKG_NAME)/description > diff --git a/src/packages/fff/fff-network/files/etc/config/network > b/src/packages/fff/fff-network/files/etc/config/network > index 08a897b..6ee3443 100644 > --- a/src/packages/fff/fff-network/files/etc/config/network > +++ b/src/packages/fff/fff-network/files/etc/config/network > @@ -4,9 +4,15 @@ config interface 'loopback' > option ipaddr '127.0.0.1' > option netmask '255.0.0.0' > > +config interface 'dummy' > + option proto 'dummy' > + > config interface 'mesh' > option type 'bridge' > + option ifname 'dummy0' > option auto '1' > + option bridge_empty '1' > + option force_link '1' > > config interface 'wan' > option proto 'dhcp' > diff --git a/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > new file mode 100755 > index 0000000..8cb9994 > --- /dev/null > +++ b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > @@ -0,0 +1,24 @@ > +#!/bin/sh > + > +. /lib/functions.sh > +. ../netifd-proto.sh > +init_proto "$@" > + > +proto_dummy_setup() { > + local config="$1" > + local iface="$2" > + > + ip link add "$iface" type dummy > + > + proto_init_update "$iface" 1 > + proto_send_update "$config" > +} > + > +proto_dummy_teardown() { > + local config="$1" > + local iface="$2" > + > + ip link delete dev "$iface" > +} > + > +add_protocol dummy > diff --git a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > index f318d8e..51a3487 100755 > --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > /dev/null || [ > "$FORCEPARSE" = '1' ] ; then > uci set network.${SWITCHDEV}_3.vlan=3 > uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" > > - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" > + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" > > uci set network.ethmesh.ifname="$SWITCHDEV.3" > > @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > network.$SWITCHDEV.ifname || [ "$FO > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> > /etc/sysctl.conf > - uci set network.mesh.ifname="bat0" > + uci set network.mesh.ifname="dummy0 bat0" > uci set network.wan.ifname="$WANDEV" > uci del uci set network.ethmesh.ifname > uci del network.eth0.macaddr > @@ -140,7 +140,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > network.$SWITCHDEV.ifname || [ "$FO > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > /etc/sysctl.conf > - uci set network.mesh.ifname="bat0 $SWITCHDEV" > + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" > uci set network.wan.ifname="eth1" #eth1 because it is default in config > file > uci del network.ethmesh.ifname > uci del network.eth0.macaddr > @@ -149,7 +149,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > network.$SWITCHDEV.ifname || [ "$FO > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > /etc/sysctl.conf > - uci set network.mesh.ifname="bat0" > + uci set network.mesh.ifname="dummy0 bat0" > uci set network.wan.ifname="eth1" #eth1 because it is default in config > file > uci set network.ethmesh.ifname="$SWITCHDEV" > ETH0MAC="w2ap" > -- > 2.11.0 > > -- > franken-dev mailing list > franken-dev@freifunk.net > http://lists.freifunk.net/mailman/listinfo/franken-dev-freifunk.net
Hallo Tim Tested-by: Christian Dresel <fff@chrisi01.de> Prinzipiell gesagt: Dies ist "sauberer" als Alfred neu zu starten im configurehood, von der Seite gefällt es mir besser. Es legt aber wieder ein neues Interface an (sind ja eh schon genug...), und braucht anscheinend einen weiteren kmod (keine Ahnung wieviel Speicher das frisst, hab nicht nachgeguckt, 841er FW hat aber noch gebaut). Im Endeffekt bin ich aber für diese Idee da einfach sauberer. bridge_empty '1' & force_link '1' alleine ohne den dummy Interface reichen nicht damit die Bridge immer "an" ist? bisschen was Inline: On 20.01.2018 19:05, Tim Niemeyer wrote: > Fixes #78 > > Signed-off-by: Tim Niemeyer <tim@tn-x.org> > --- > > src/packages/fff/fff-network/Makefile | 4 ++-- > .../fff/fff-network/files/etc/config/network | 6 ++++++ > .../fff-network/files/lib/netifd/proto/dummy.sh | 24 ++++++++++++++++++++++ > .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- > 4 files changed, 36 insertions(+), 6 deletions(-) > create mode 100755 src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile > index 348897d..6700682 100644 > --- a/src/packages/fff/fff-network/Makefile > +++ b/src/packages/fff/fff-network/Makefile > @@ -1,7 +1,7 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=fff-network > -PKG_VERSION:=10 > +PKG_VERSION:=11 > PKG_RELEASE:=1 > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) > CATEGORY:=Freifunk > TITLE:= Freifunk-Franken network configuration > URL:=http://www.freifunk-franken.de > - DEPENDS:=+fff-uradvd +fff-boardname > + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy > endef > > define Package/$(PKG_NAME)/description > diff --git a/src/packages/fff/fff-network/files/etc/config/network b/src/packages/fff/fff-network/files/etc/config/network > index 08a897b..6ee3443 100644 > --- a/src/packages/fff/fff-network/files/etc/config/network > +++ b/src/packages/fff/fff-network/files/etc/config/network > @@ -4,9 +4,15 @@ config interface 'loopback' > option ipaddr '127.0.0.1' > option netmask '255.0.0.0' > > +config interface 'dummy' > + option proto 'dummy' > + > config interface 'mesh' > option type 'bridge' > + option ifname 'dummy0' > option auto '1' > + option bridge_empty '1' > + option force_link '1' > > config interface 'wan' > option proto 'dhcp' > diff --git a/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > new file mode 100755 > index 0000000..8cb9994 > --- /dev/null > +++ b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh kannst du mir (grob) erklären was dieses Script tut? Wird irgendwie nirgens aufgerufen und versteh daher nicht warum es nötig ist. > @@ -0,0 +1,24 @@ > +#!/bin/sh > + > +. /lib/functions.sh > +. ../netifd-proto.sh > +init_proto "$@" > + > +proto_dummy_setup() { > + local config="$1" > + local iface="$2" > + > + ip link add "$iface" type dummy Tab statt Leerzeichen > + > + proto_init_update "$iface" 1 > + proto_send_update "$config" > +} > + > +proto_dummy_teardown() { > + local config="$1" > + local iface="$2" > + > + ip link delete dev "$iface" Tab statt Leerzeichen mfg Christian > +} > + > +add_protocol dummy > diff --git a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > index f318d8e..51a3487 100755 > --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > /dev/null || [ "$FORCEPARSE" = '1' ] ; then > uci set network.${SWITCHDEV}_3.vlan=3 > uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" > > - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" > + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" > > uci set network.ethmesh.ifname="$SWITCHDEV.3" > > @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get network.$SWITCHDEV.ifname || [ "$FO > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf > - uci set network.mesh.ifname="bat0" > + uci set network.mesh.ifname="dummy0 bat0" > uci set network.wan.ifname="$WANDEV" > uci del uci set network.ethmesh.ifname > uci del network.eth0.macaddr > @@ -140,7 +140,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get network.$SWITCHDEV.ifname || [ "$FO > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> /etc/sysctl.conf > - uci set network.mesh.ifname="bat0 $SWITCHDEV" > + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" > uci set network.wan.ifname="eth1" #eth1 because it is default in config file > uci del network.ethmesh.ifname > uci del network.eth0.macaddr > @@ -149,7 +149,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get network.$SWITCHDEV.ifname || [ "$FO > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> /etc/sysctl.conf > - uci set network.mesh.ifname="bat0" > + uci set network.mesh.ifname="dummy0 bat0" > uci set network.wan.ifname="eth1" #eth1 because it is default in config file > uci set network.ethmesh.ifname="$SWITCHDEV" > ETH0MAC="w2ap" >
Am Sonntag, den 21.01.2018, 10:22 +0100 schrieb Christian Dresel: > Hallo Tim > > Tested-by: Christian Dresel <fff@chrisi01.de> > > Prinzipiell gesagt: > Dies ist "sauberer" als Alfred neu zu starten im configurehood, von > der > Seite gefällt es mir besser. Es legt aber wieder ein neues Interface > an > (sind ja eh schon genug...), und braucht anscheinend einen weiteren > kmod > (keine Ahnung wieviel Speicher das frisst, hab nicht nachgeguckt, > 841er > FW hat aber noch gebaut). > Im Endeffekt bin ich aber für diese Idee da einfach sauberer. > > bridge_empty '1' & force_link '1' alleine ohne den dummy Interface > reichen nicht damit die Bridge immer "an" ist? Nein leider nicht. Das Interface ist dann zwar da, aber der Kernel meint es ist nicht bereit um UP zu kommen. Daher bekommt es keine IPv6 Link-Local. Und genau daran stört sich das Alfred. > bisschen was Inline: > > On 20.01.2018 19:05, Tim Niemeyer wrote: > > Fixes #78 > > > > Signed-off-by: Tim Niemeyer <tim@tn-x.org> > > --- > > > > src/packages/fff/fff-network/Makefile | 4 ++-- > > .../fff/fff-network/files/etc/config/network | 6 ++++++ > > .../fff-network/files/lib/netifd/proto/dummy.sh | 24 > > ++++++++++++++++++++++ > > .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- > > 4 files changed, 36 insertions(+), 6 deletions(-) > > create mode 100755 src/packages/fff/fff- > > network/files/lib/netifd/proto/dummy.sh > > > > diff --git a/src/packages/fff/fff-network/Makefile > > b/src/packages/fff/fff-network/Makefile > > index 348897d..6700682 100644 > > --- a/src/packages/fff/fff-network/Makefile > > +++ b/src/packages/fff/fff-network/Makefile > > @@ -1,7 +1,7 @@ > > include $(TOPDIR)/rules.mk > > > > PKG_NAME:=fff-network > > -PKG_VERSION:=10 > > +PKG_VERSION:=11 > > PKG_RELEASE:=1 > > > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > > @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) > > CATEGORY:=Freifunk > > TITLE:= Freifunk-Franken network configuration > > URL:=http://www.freifunk-franken.de > > - DEPENDS:=+fff-uradvd +fff-boardname > > + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy > > endef > > > > define Package/$(PKG_NAME)/description > > diff --git a/src/packages/fff/fff-network/files/etc/config/network > > b/src/packages/fff/fff-network/files/etc/config/network > > index 08a897b..6ee3443 100644 > > --- a/src/packages/fff/fff-network/files/etc/config/network > > +++ b/src/packages/fff/fff-network/files/etc/config/network > > @@ -4,9 +4,15 @@ config interface 'loopback' > > option ipaddr '127.0.0.1' > > option netmask '255.0.0.0' > > > > +config interface 'dummy' > > + option proto 'dummy' Hier wird das netifd Proto "dummy" verwendet. > > + > > config interface 'mesh' > > option type 'bridge' > > + option ifname 'dummy0' > > option auto '1' > > + option bridge_empty '1' > > + option force_link '1' > > > > config interface 'wan' > > option proto 'dhcp' > > diff --git a/src/packages/fff/fff- > > network/files/lib/netifd/proto/dummy.sh b/src/packages/fff/fff- > > network/files/lib/netifd/proto/dummy.sh > > new file mode 100755 > > index 0000000..8cb9994 > > --- /dev/null > > +++ b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > kannst du mir (grob) erklären was dieses Script tut? Wird irgendwie > nirgens aufgerufen und versteh daher nicht warum es nötig ist. Ich erweitere damit den netifd, und bringe ihm bei mit einem neuen Protokoll namens "dummy" umzugehen. (Siehe oben) > > @@ -0,0 +1,24 @@ > > +#!/bin/sh > > + > > +. /lib/functions.sh > > +. ../netifd-proto.sh > > +init_proto "$@" > > + > > +proto_dummy_setup() { > > + local config="$1" > > + local iface="$2" > > + > > + ip link add "$iface" type dummy > > Tab statt Leerzeichen Ops. ;) > > > + > > + proto_init_update "$iface" 1 > > + proto_send_update "$config" > > +} > > + > > +proto_dummy_teardown() { > > + local config="$1" > > + local iface="$2" > > + > > + ip link delete dev "$iface" > > Tab statt Leerzeichen Ja, mach ich dann beim überarbeiten. Danke fürs reviewen und testen. Tim > > mfg > > Christian > > > +} > > + > > +add_protocol dummy > > diff --git a/src/packages/fff/fff- > > network/files/usr/sbin/configurenetwork b/src/packages/fff/fff- > > network/files/usr/sbin/configurenetwork > > index f318d8e..51a3487 100755 > > --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > /dev/null > > || [ "$FORCEPARSE" = '1' ] ; then > > uci set network.${SWITCHDEV}_3.vlan=3 > > uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" > > > > - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" > > + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" > > > > uci set network.ethmesh.ifname="$SWITCHDEV.3" > > > > @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > > network.$SWITCHDEV.ifname || [ "$FO > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> > > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> > > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> > > /etc/sysctl.conf > > - uci set network.mesh.ifname="bat0" > > + uci set network.mesh.ifname="dummy0 bat0" > > uci set network.wan.ifname="$WANDEV" > > uci del uci set network.ethmesh.ifname > > uci del network.eth0.macaddr > > @@ -140,7 +140,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > > network.$SWITCHDEV.ifname || [ "$FO > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > > /etc/sysctl.conf > > - uci set network.mesh.ifname="bat0 $SWITCHDEV" > > + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" > > uci set network.wan.ifname="eth1" #eth1 because it is > > default in config file > > uci del network.ethmesh.ifname > > uci del network.eth0.macaddr > > @@ -149,7 +149,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > > network.$SWITCHDEV.ifname || [ "$FO > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > > /etc/sysctl.conf > > - uci set network.mesh.ifname="bat0" > > + uci set network.mesh.ifname="dummy0 bat0" > > uci set network.wan.ifname="eth1" #eth1 because it is > > default in config file > > uci set network.ethmesh.ifname="$SWITCHDEV" > > ETH0MAC="w2ap" > > > >
On 21.01.2018 11:13, Tim Niemeyer wrote: > Am Sonntag, den 21.01.2018, 10:22 +0100 schrieb Christian Dresel: >> Hallo Tim >> >> Tested-by: Christian Dresel <fff@chrisi01.de> >> >> Prinzipiell gesagt: >> Dies ist "sauberer" als Alfred neu zu starten im configurehood, von >> der >> Seite gefällt es mir besser. Es legt aber wieder ein neues Interface >> an >> (sind ja eh schon genug...), und braucht anscheinend einen weiteren >> kmod >> (keine Ahnung wieviel Speicher das frisst, hab nicht nachgeguckt, >> 841er >> FW hat aber noch gebaut). >> Im Endeffekt bin ich aber für diese Idee da einfach sauberer. >> >> bridge_empty '1' & force_link '1' alleine ohne den dummy Interface >> reichen nicht damit die Bridge immer "an" ist? > Nein leider nicht. Das Interface ist dann zwar da, aber der Kernel > meint es ist nicht bereit um UP zu kommen. Daher bekommt es keine IPv6 schade :( > Link-Local. Und genau daran stört sich das Alfred. > >> bisschen was Inline: >> >> On 20.01.2018 19:05, Tim Niemeyer wrote: >>> Fixes #78 >>> >>> Signed-off-by: Tim Niemeyer <tim@tn-x.org> >>> --- >>> >>> src/packages/fff/fff-network/Makefile | 4 ++-- >>> .../fff/fff-network/files/etc/config/network | 6 ++++++ >>> .../fff-network/files/lib/netifd/proto/dummy.sh | 24 >>> ++++++++++++++++++++++ >>> .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- >>> 4 files changed, 36 insertions(+), 6 deletions(-) >>> create mode 100755 src/packages/fff/fff- >>> network/files/lib/netifd/proto/dummy.sh >>> >>> diff --git a/src/packages/fff/fff-network/Makefile >>> b/src/packages/fff/fff-network/Makefile >>> index 348897d..6700682 100644 >>> --- a/src/packages/fff/fff-network/Makefile >>> +++ b/src/packages/fff/fff-network/Makefile >>> @@ -1,7 +1,7 @@ >>> include $(TOPDIR)/rules.mk >>> >>> PKG_NAME:=fff-network >>> -PKG_VERSION:=10 >>> +PKG_VERSION:=11 >>> PKG_RELEASE:=1 >>> >>> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) >>> @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) >>> CATEGORY:=Freifunk >>> TITLE:= Freifunk-Franken network configuration >>> URL:=http://www.freifunk-franken.de >>> - DEPENDS:=+fff-uradvd +fff-boardname >>> + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy >>> endef >>> >>> define Package/$(PKG_NAME)/description >>> diff --git a/src/packages/fff/fff-network/files/etc/config/network >>> b/src/packages/fff/fff-network/files/etc/config/network >>> index 08a897b..6ee3443 100644 >>> --- a/src/packages/fff/fff-network/files/etc/config/network >>> +++ b/src/packages/fff/fff-network/files/etc/config/network >>> @@ -4,9 +4,15 @@ config interface 'loopback' >>> option ipaddr '127.0.0.1' >>> option netmask '255.0.0.0' >>> >>> +config interface 'dummy' >>> + option proto 'dummy' > Hier wird das netifd Proto "dummy" verwendet. > >>> + >>> config interface 'mesh' >>> option type 'bridge' >>> + option ifname 'dummy0' >>> option auto '1' >>> + option bridge_empty '1' >>> + option force_link '1' >>> >>> config interface 'wan' >>> option proto 'dhcp' >>> diff --git a/src/packages/fff/fff- >>> network/files/lib/netifd/proto/dummy.sh b/src/packages/fff/fff- >>> network/files/lib/netifd/proto/dummy.sh >>> new file mode 100755 >>> index 0000000..8cb9994 >>> --- /dev/null >>> +++ b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh >> >> kannst du mir (grob) erklären was dieses Script tut? Wird irgendwie >> nirgens aufgerufen und versteh daher nicht warum es nötig ist. > Ich erweitere damit den netifd, und bringe ihm bei mit einem neuen > Protokoll namens "dummy" umzugehen. (Siehe oben) Jetzt hab ich es glaub ich verstanden, wer das noch bisschen lesen will: https://wiki.openwrt.org/doc/devel/network-scripting > >>> @@ -0,0 +1,24 @@ >>> +#!/bin/sh >>> + >>> +. /lib/functions.sh >>> +. ../netifd-proto.sh >>> +init_proto "$@" >>> + >>> +proto_dummy_setup() { >>> + local config="$1" >>> + local iface="$2" >>> + >>> + ip link add "$iface" type dummy >> >> Tab statt Leerzeichen > Ops. ;) > >> >>> + >>> + proto_init_update "$iface" 1 >>> + proto_send_update "$config" >>> +} >>> + >>> +proto_dummy_teardown() { >>> + local config="$1" >>> + local iface="$2" >>> + >>> + ip link delete dev "$iface" >> >> Tab statt Leerzeichen > Ja, mach ich dann beim überarbeiten. Falls sonst keine Dinge mehr sind, wegen mir auch einfach beim applien anpassen Reviewed-by: Christian Dresel <fff@chrisi01.de> Ich würde aber darum bitten mit dem applien noch zu warten bis Adrian auch mit zufrieden ist. mfg Christian > > Danke fürs reviewen und testen. > > Tim > >> >> mfg >> >> Christian >> >>> +} >>> + >>> +add_protocol dummy >>> diff --git a/src/packages/fff/fff- >>> network/files/usr/sbin/configurenetwork b/src/packages/fff/fff- >>> network/files/usr/sbin/configurenetwork >>> index f318d8e..51a3487 100755 >>> --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork >>> +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork >>> @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > /dev/null >>> || [ "$FORCEPARSE" = '1' ] ; then >>> uci set network.${SWITCHDEV}_3.vlan=3 >>> uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" >>> >>> - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" >>> + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" >>> >>> uci set network.ethmesh.ifname="$SWITCHDEV.3" >>> >>> @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get >>> network.$SWITCHDEV.ifname || [ "$FO >>> echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> >>> /etc/sysctl.conf >>> echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> >>> /etc/sysctl.conf >>> echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> >>> /etc/sysctl.conf >>> - uci set network.mesh.ifname="bat0" >>> + uci set network.mesh.ifname="dummy0 bat0" >>> uci set network.wan.ifname="$WANDEV" >>> uci del uci set network.ethmesh.ifname >>> uci del network.eth0.macaddr >>> @@ -140,7 +140,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get >>> network.$SWITCHDEV.ifname || [ "$FO >>> echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> >>> /etc/sysctl.conf >>> echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> >>> /etc/sysctl.conf >>> echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> >>> /etc/sysctl.conf >>> - uci set network.mesh.ifname="bat0 $SWITCHDEV" >>> + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" >>> uci set network.wan.ifname="eth1" #eth1 because it is >>> default in config file >>> uci del network.ethmesh.ifname >>> uci del network.eth0.macaddr >>> @@ -149,7 +149,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get >>> network.$SWITCHDEV.ifname || [ "$FO >>> echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> >>> /etc/sysctl.conf >>> echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> >>> /etc/sysctl.conf >>> echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> >>> /etc/sysctl.conf >>> - uci set network.mesh.ifname="bat0" >>> + uci set network.mesh.ifname="dummy0 bat0" >>> uci set network.wan.ifname="eth1" #eth1 because it is >>> default in config file >>> uci set network.ethmesh.ifname="$SWITCHDEV" >>> ETH0MAC="w2ap" >>> >>
Hallo, mich würde interessieren, ob es ein objektiveres Kriterium als "sauberer" gibt. Den was "sauber" ist, liegt oft (nicht immer) im Auge des Betrachters. Und so einen richtigen Grund, warum der restart schlechter ist, habe ich leider noch nicht gehört. Grüße adrian > -----Original Message----- > From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf > Of Christian Dresel > Sent: Sonntag, 21. Januar 2018 10:23 > To: Tim Niemeyer <tim@tn-x.org>; franken-dev@freifunk.net > Subject: Re: [PATCH] fff-network: add dummy iface to force bridge to up > > Hallo Tim > > Tested-by: Christian Dresel <fff@chrisi01.de> > > Prinzipiell gesagt: > Dies ist "sauberer" als Alfred neu zu starten im configurehood, von der Seite > gefällt es mir besser. Es legt aber wieder ein neues Interface an (sind ja eh > schon genug...), und braucht anscheinend einen weiteren kmod (keine > Ahnung wieviel Speicher das frisst, hab nicht nachgeguckt, 841er FW hat aber > noch gebaut). > Im Endeffekt bin ich aber für diese Idee da einfach sauberer. > > bridge_empty '1' & force_link '1' alleine ohne den dummy Interface reichen > nicht damit die Bridge immer "an" ist? > > bisschen was Inline: > > On 20.01.2018 19:05, Tim Niemeyer wrote: > > Fixes #78 > > > > Signed-off-by: Tim Niemeyer <tim@tn-x.org> > > --- > > > > src/packages/fff/fff-network/Makefile | 4 ++-- > > .../fff/fff-network/files/etc/config/network | 6 ++++++ > > .../fff-network/files/lib/netifd/proto/dummy.sh | 24 > ++++++++++++++++++++++ > > .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- > > 4 files changed, 36 insertions(+), 6 deletions(-) create mode 100755 > > src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > > diff --git a/src/packages/fff/fff-network/Makefile > > b/src/packages/fff/fff-network/Makefile > > index 348897d..6700682 100644 > > --- a/src/packages/fff/fff-network/Makefile > > +++ b/src/packages/fff/fff-network/Makefile > > @@ -1,7 +1,7 @@ > > include $(TOPDIR)/rules.mk > > > > PKG_NAME:=fff-network > > -PKG_VERSION:=10 > > +PKG_VERSION:=11 > > PKG_RELEASE:=1 > > > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > > @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) > > CATEGORY:=Freifunk > > TITLE:= Freifunk-Franken network configuration > > URL:=http://www.freifunk-franken.de > > - DEPENDS:=+fff-uradvd +fff-boardname > > + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy > > endef > > > > define Package/$(PKG_NAME)/description diff --git > > a/src/packages/fff/fff-network/files/etc/config/network > > b/src/packages/fff/fff-network/files/etc/config/network > > index 08a897b..6ee3443 100644 > > --- a/src/packages/fff/fff-network/files/etc/config/network > > +++ b/src/packages/fff/fff-network/files/etc/config/network > > @@ -4,9 +4,15 @@ config interface 'loopback' > > option ipaddr '127.0.0.1' > > option netmask '255.0.0.0' > > > > +config interface 'dummy' > > + option proto 'dummy' > > + > > config interface 'mesh' > > option type 'bridge' > > + option ifname 'dummy0' > > option auto '1' > > + option bridge_empty '1' > > + option force_link '1' > > > > config interface 'wan' > > option proto 'dhcp' > > diff --git > > a/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > new file mode 100755 > > index 0000000..8cb9994 > > --- /dev/null > > +++ b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > kannst du mir (grob) erklären was dieses Script tut? Wird irgendwie nirgens > aufgerufen und versteh daher nicht warum es nötig ist. > > > @@ -0,0 +1,24 @@ > > +#!/bin/sh > > + > > +. /lib/functions.sh > > +. ../netifd-proto.sh > > +init_proto "$@" > > + > > +proto_dummy_setup() { > > + local config="$1" > > + local iface="$2" > > + > > + ip link add "$iface" type dummy > > Tab statt Leerzeichen > > > + > > + proto_init_update "$iface" 1 > > + proto_send_update "$config" > > +} > > + > > +proto_dummy_teardown() { > > + local config="$1" > > + local iface="$2" > > + > > + ip link delete dev "$iface" > > Tab statt Leerzeichen > > mfg > > Christian > > > +} > > + > > +add_protocol dummy > > diff --git > > a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > index f318d8e..51a3487 100755 > > --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > /dev/null || [ > "$FORCEPARSE" = '1' ] ; then > > uci set network.${SWITCHDEV}_3.vlan=3 > > uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" > > > > - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" > > + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" > > > > uci set network.ethmesh.ifname="$SWITCHDEV.3" > > > > @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > network.$SWITCHDEV.ifname || [ "$FO > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> > /etc/sysctl.conf > > - uci set network.mesh.ifname="bat0" > > + uci set network.mesh.ifname="dummy0 bat0" > > uci set network.wan.ifname="$WANDEV" > > uci del uci set network.ethmesh.ifname > > uci del network.eth0.macaddr > > @@ -140,7 +140,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > network.$SWITCHDEV.ifname || [ "$FO > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > /etc/sysctl.conf > > - uci set network.mesh.ifname="bat0 $SWITCHDEV" > > + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" > > uci set network.wan.ifname="eth1" #eth1 because it is default in > config file > > uci del network.ethmesh.ifname > > uci del network.eth0.macaddr > > @@ -149,7 +149,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > network.$SWITCHDEV.ifname || [ "$FO > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> /etc/sysctl.conf > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > /etc/sysctl.conf > > - uci set network.mesh.ifname="bat0" > > + uci set network.mesh.ifname="dummy0 bat0" > > uci set network.wan.ifname="eth1" #eth1 because it is default in > config file > > uci set network.ethmesh.ifname="$SWITCHDEV" > > ETH0MAC="w2ap" > >
Moin Am Sonntag, den 21.01.2018, 13:08 +0100 schrieb mail@adrianschmutzler.de: > Hallo, > > mich würde interessieren, ob es ein objektiveres Kriterium als > "sauberer" gibt. > > Den was "sauber" ist, liegt oft (nicht immer) im Auge des > Betrachters. Zum einen hast du selber gesagt, dass deine Lösung nur ein Workaround ist. > Und so einen richtigen Grund, warum der restart schlechter ist, habe > ich leider noch nicht gehört. Zum anderen halte ich es für unschön, wenn man den alfred ständig tritt, obwohl der eigentlich vielleicht grad super läuft und gerade mitten irgendwelche wichtigen Synchronisierungstätigkeiten macht. Keine Ahnung ob der das tut, aber einfach ohne Grund immer neustarten ist aus meiner Sicht unsauber. Die Frage ist, wie kommen wir da jetzt weiter. Ich sehe aktuell bei deiner Lösung weniger Risiko das was ernsthaftes kaputt geht. Meine Lösung greift tiefer ins System ein. Ich schlage daher vor wir applien deinen Patch, nach dem Release reverten wir den und applien meinen. Tim > Grüße > > adrian > > > -----Original Message----- > > From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On > > Behalf > > Of Christian Dresel > > Sent: Sonntag, 21. Januar 2018 10:23 > > To: Tim Niemeyer <tim@tn-x.org>; franken-dev@freifunk.net > > Subject: Re: [PATCH] fff-network: add dummy iface to force bridge > > to up > > > > Hallo Tim > > > > Tested-by: Christian Dresel <fff@chrisi01.de> > > > > Prinzipiell gesagt: > > Dies ist "sauberer" als Alfred neu zu starten im configurehood, von > > der Seite > > gefällt es mir besser. Es legt aber wieder ein neues Interface an > > (sind ja eh > > schon genug...), und braucht anscheinend einen weiteren kmod (keine > > Ahnung wieviel Speicher das frisst, hab nicht nachgeguckt, 841er FW > > hat aber > > noch gebaut). > > Im Endeffekt bin ich aber für diese Idee da einfach sauberer. > > > > bridge_empty '1' & force_link '1' alleine ohne den dummy Interface > > reichen > > nicht damit die Bridge immer "an" ist? > > > > bisschen was Inline: > > > > On 20.01.2018 19:05, Tim Niemeyer wrote: > > > Fixes #78 > > > > > > Signed-off-by: Tim Niemeyer <tim@tn-x.org> > > > --- > > > > > > src/packages/fff/fff-network/Makefile | 4 ++-- > > > .../fff/fff-network/files/etc/config/network | 6 ++++++ > > > .../fff-network/files/lib/netifd/proto/dummy.sh | 24 > > > > ++++++++++++++++++++++ > > > .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- > > > 4 files changed, 36 insertions(+), 6 deletions(-) create mode > > > 100755 > > > src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > > > > diff --git a/src/packages/fff/fff-network/Makefile > > > b/src/packages/fff/fff-network/Makefile > > > index 348897d..6700682 100644 > > > --- a/src/packages/fff/fff-network/Makefile > > > +++ b/src/packages/fff/fff-network/Makefile > > > @@ -1,7 +1,7 @@ > > > include $(TOPDIR)/rules.mk > > > > > > PKG_NAME:=fff-network > > > -PKG_VERSION:=10 > > > +PKG_VERSION:=11 > > > PKG_RELEASE:=1 > > > > > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > > > @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) > > > CATEGORY:=Freifunk > > > TITLE:= Freifunk-Franken network configuration > > > URL:=http://www.freifunk-franken.de > > > - DEPENDS:=+fff-uradvd +fff-boardname > > > + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy > > > endef > > > > > > define Package/$(PKG_NAME)/description diff --git > > > a/src/packages/fff/fff-network/files/etc/config/network > > > b/src/packages/fff/fff-network/files/etc/config/network > > > index 08a897b..6ee3443 100644 > > > --- a/src/packages/fff/fff-network/files/etc/config/network > > > +++ b/src/packages/fff/fff-network/files/etc/config/network > > > @@ -4,9 +4,15 @@ config interface 'loopback' > > > option ipaddr '127.0.0.1' > > > option netmask '255.0.0.0' > > > > > > +config interface 'dummy' > > > + option proto 'dummy' > > > + > > > config interface 'mesh' > > > option type 'bridge' > > > + option ifname 'dummy0' > > > option auto '1' > > > + option bridge_empty '1' > > > + option force_link '1' > > > > > > config interface 'wan' > > > option proto 'dhcp' > > > diff --git > > > a/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > new file mode 100755 > > > index 0000000..8cb9994 > > > --- /dev/null > > > +++ b/src/packages/fff/fff- > > > network/files/lib/netifd/proto/dummy.sh > > > > kannst du mir (grob) erklären was dieses Script tut? Wird irgendwie > > nirgens > > aufgerufen und versteh daher nicht warum es nötig ist. > > > > > @@ -0,0 +1,24 @@ > > > +#!/bin/sh > > > + > > > +. /lib/functions.sh > > > +. ../netifd-proto.sh > > > +init_proto "$@" > > > + > > > +proto_dummy_setup() { > > > + local config="$1" > > > + local iface="$2" > > > + > > > + ip link add "$iface" type dummy > > > > Tab statt Leerzeichen > > > > > + > > > + proto_init_update "$iface" 1 > > > + proto_send_update "$config" > > > +} > > > + > > > +proto_dummy_teardown() { > > > + local config="$1" > > > + local iface="$2" > > > + > > > + ip link delete dev "$iface" > > > > Tab statt Leerzeichen > > > > mfg > > > > Christian > > > > > +} > > > + > > > +add_protocol dummy > > > diff --git > > > a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > > b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > > index f318d8e..51a3487 100755 > > > --- a/src/packages/fff/fff- > > > network/files/usr/sbin/configurenetwork > > > +++ b/src/packages/fff/fff- > > > network/files/usr/sbin/configurenetwork > > > @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > > > > /dev/null || [ > > > > "$FORCEPARSE" = '1' ] ; then > > > uci set network.${SWITCHDEV}_3.vlan=3 > > > uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" > > > > > > - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" > > > + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" > > > > > > uci set network.ethmesh.ifname="$SWITCHDEV.3" > > > > > > @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > network.$SWITCHDEV.ifname || [ "$FO > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> > > > > /etc/sysctl.conf > > > echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> > > > /etc/sysctl.conf > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> > > > > /etc/sysctl.conf > > > - uci set network.mesh.ifname="bat0" > > > + uci set network.mesh.ifname="dummy0 bat0" > > > uci set network.wan.ifname="$WANDEV" > > > uci del uci set network.ethmesh.ifname > > > uci del network.eth0.macaddr > > > @@ -140,7 +140,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > network.$SWITCHDEV.ifname || [ "$FO > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > > > /etc/sysctl.conf > > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > > /etc/sysctl.conf > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > > > > /etc/sysctl.conf > > > - uci set network.mesh.ifname="bat0 $SWITCHDEV" > > > + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" > > > uci set network.wan.ifname="eth1" #eth1 because it is > > > default in > > > > config file > > > uci del network.ethmesh.ifname > > > uci del network.eth0.macaddr > > > @@ -149,7 +149,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > network.$SWITCHDEV.ifname || [ "$FO > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > > > /etc/sysctl.conf > > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > > /etc/sysctl.conf > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > > > > /etc/sysctl.conf > > > - uci set network.mesh.ifname="bat0" > > > + uci set network.mesh.ifname="dummy0 bat0" > > > uci set network.wan.ifname="eth1" #eth1 because it is > > > default in > > > > config file > > > uci set network.ethmesh.ifname="$SWITCHDEV" > > > ETH0MAC="w2ap" > > > > >
Hallo Tim, als ich das mit dem "Workaround" geschrieben hatte, hatte ich noch weniger von der Sache verstanden. Ich finde deinen Kompromiss aber nicht schlecht, ich würde mir auch gerne die Zeit nehmen, deine Lösung besser zu verstehen. Ich lasse mich auch gerne überzeugen, ich mag halt zunächst die Idee mit den Dummy-Interfaces eher nicht. Für ein alpha-Release hat meine Lösung im Moment den Vorteil, dass sie zumindest in meiner Firmware getestet ist und das Alfred jetzt tatsächlich immer funktioniert. Für einen richtigen Test deines Patches muss man ja dann auch die alten Dummy-Interfaces mit rauspatchen, sonst ist das Problem gar nicht reproduzierbar (weil dann beim Boot ja Dummy-w2mesh vorhanden ist). Das würde ich gerne noch gut testen. Grüße Adrian > -----Original Message----- > From: Tim Niemeyer [mailto:tim@tn-x.org] > Sent: Sonntag, 21. Januar 2018 13:13 > To: mail@adrianschmutzler.de; franken-dev@freifunk.net; 'Christian Dresel' > <fff@chrisi01.de> > Subject: Re: [PATCH] fff-network: add dummy iface to force bridge to up > > Moin > > Am Sonntag, den 21.01.2018, 13:08 +0100 schrieb > mail@adrianschmutzler.de: > > Hallo, > > > > mich würde interessieren, ob es ein objektiveres Kriterium als > > "sauberer" gibt. > > > > Den was "sauber" ist, liegt oft (nicht immer) im Auge des Betrachters. > Zum einen hast du selber gesagt, dass deine Lösung nur ein Workaround ist. > > > Und so einen richtigen Grund, warum der restart schlechter ist, habe > > ich leider noch nicht gehört. > Zum anderen halte ich es für unschön, wenn man den alfred ständig tritt, > obwohl der eigentlich vielleicht grad super läuft und gerade mitten > irgendwelche wichtigen Synchronisierungstätigkeiten macht. Keine Ahnung > ob der das tut, aber einfach ohne Grund immer neustarten ist aus meiner > Sicht unsauber. > > Die Frage ist, wie kommen wir da jetzt weiter. Ich sehe aktuell bei deiner > Lösung weniger Risiko das was ernsthaftes kaputt geht. Meine Lösung greift > tiefer ins System ein. > > Ich schlage daher vor wir applien deinen Patch, nach dem Release reverten > wir den und applien meinen. > > Tim > > > Grüße > > > > adrian > > > > > -----Original Message----- > > > From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On > > > Behalf Of Christian Dresel > > > Sent: Sonntag, 21. Januar 2018 10:23 > > > To: Tim Niemeyer <tim@tn-x.org>; franken-dev@freifunk.net > > > Subject: Re: [PATCH] fff-network: add dummy iface to force bridge to > > > up > > > > > > Hallo Tim > > > > > > Tested-by: Christian Dresel <fff@chrisi01.de> > > > > > > Prinzipiell gesagt: > > > Dies ist "sauberer" als Alfred neu zu starten im configurehood, von > > > der Seite gefällt es mir besser. Es legt aber wieder ein neues > > > Interface an (sind ja eh schon genug...), und braucht anscheinend > > > einen weiteren kmod (keine Ahnung wieviel Speicher das frisst, hab > > > nicht nachgeguckt, 841er FW hat aber noch gebaut). > > > Im Endeffekt bin ich aber für diese Idee da einfach sauberer. > > > > > > bridge_empty '1' & force_link '1' alleine ohne den dummy Interface > > > reichen nicht damit die Bridge immer "an" ist? > > > > > > bisschen was Inline: > > > > > > On 20.01.2018 19:05, Tim Niemeyer wrote: > > > > Fixes #78 > > > > > > > > Signed-off-by: Tim Niemeyer <tim@tn-x.org> > > > > --- > > > > > > > > src/packages/fff/fff-network/Makefile | 4 ++-- > > > > .../fff/fff-network/files/etc/config/network | 6 ++++++ > > > > .../fff-network/files/lib/netifd/proto/dummy.sh | 24 > > > > > > ++++++++++++++++++++++ > > > > .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- > > > > 4 files changed, 36 insertions(+), 6 deletions(-) create mode > > > > 100755 > > > > src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > > > > > > diff --git a/src/packages/fff/fff-network/Makefile > > > > b/src/packages/fff/fff-network/Makefile > > > > index 348897d..6700682 100644 > > > > --- a/src/packages/fff/fff-network/Makefile > > > > +++ b/src/packages/fff/fff-network/Makefile > > > > @@ -1,7 +1,7 @@ > > > > include $(TOPDIR)/rules.mk > > > > > > > > PKG_NAME:=fff-network > > > > -PKG_VERSION:=10 > > > > +PKG_VERSION:=11 > > > > PKG_RELEASE:=1 > > > > > > > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > > > > @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) > > > > CATEGORY:=Freifunk > > > > TITLE:= Freifunk-Franken network configuration > > > > URL:=http://www.freifunk-franken.de > > > > - DEPENDS:=+fff-uradvd +fff-boardname > > > > + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy > > > > endef > > > > > > > > define Package/$(PKG_NAME)/description diff --git > > > > a/src/packages/fff/fff-network/files/etc/config/network > > > > b/src/packages/fff/fff-network/files/etc/config/network > > > > index 08a897b..6ee3443 100644 > > > > --- a/src/packages/fff/fff-network/files/etc/config/network > > > > +++ b/src/packages/fff/fff-network/files/etc/config/network > > > > @@ -4,9 +4,15 @@ config interface 'loopback' > > > > option ipaddr '127.0.0.1' > > > > option netmask '255.0.0.0' > > > > > > > > +config interface 'dummy' > > > > + option proto 'dummy' > > > > + > > > > config interface 'mesh' > > > > option type 'bridge' > > > > + option ifname 'dummy0' > > > > option auto '1' > > > > + option bridge_empty '1' > > > > + option force_link '1' > > > > > > > > config interface 'wan' > > > > option proto 'dhcp' > > > > diff --git > > > > a/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > > b/src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > > new file mode 100755 > > > > index 0000000..8cb9994 > > > > --- /dev/null > > > > +++ b/src/packages/fff/fff- > > > > network/files/lib/netifd/proto/dummy.sh > > > > > > kannst du mir (grob) erklären was dieses Script tut? Wird irgendwie > > > nirgens aufgerufen und versteh daher nicht warum es nötig ist. > > > > > > > @@ -0,0 +1,24 @@ > > > > +#!/bin/sh > > > > + > > > > +. /lib/functions.sh > > > > +. ../netifd-proto.sh > > > > +init_proto "$@" > > > > + > > > > +proto_dummy_setup() { > > > > + local config="$1" > > > > + local iface="$2" > > > > + > > > > + ip link add "$iface" type dummy > > > > > > Tab statt Leerzeichen > > > > > > > + > > > > + proto_init_update "$iface" 1 > > > > + proto_send_update "$config" > > > > +} > > > > + > > > > +proto_dummy_teardown() { > > > > + local config="$1" > > > > + local iface="$2" > > > > + > > > > + ip link delete dev "$iface" > > > > > > Tab statt Leerzeichen > > > > > > mfg > > > > > > Christian > > > > > > > +} > > > > + > > > > +add_protocol dummy > > > > diff --git > > > > a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > > > b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork > > > > index f318d8e..51a3487 100755 > > > > --- a/src/packages/fff/fff- > > > > network/files/usr/sbin/configurenetwork > > > > +++ b/src/packages/fff/fff- > > > > network/files/usr/sbin/configurenetwork > > > > @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > /dev/null > > > > || [ > > > > > > "$FORCEPARSE" = '1' ] ; then > > > > uci set network.${SWITCHDEV}_3.vlan=3 > > > > uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" > > > > > > > > - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" > > > > + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" > > > > > > > > uci set network.ethmesh.ifname="$SWITCHDEV.3" > > > > > > > > @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > > > network.$SWITCHDEV.ifname || [ "$FO > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> > > > > > > /etc/sysctl.conf > > > > echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> > > > > /etc/sysctl.conf > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> > > > > > > /etc/sysctl.conf > > > > - uci set network.mesh.ifname="bat0" > > > > + uci set network.mesh.ifname="dummy0 bat0" > > > > uci set network.wan.ifname="$WANDEV" > > > > uci del uci set network.ethmesh.ifname > > > > uci del network.eth0.macaddr @@ -140,7 +140,7 @@ if [ > > > > "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > > > network.$SWITCHDEV.ifname || [ "$FO > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > > > > > /etc/sysctl.conf > > > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > > > /etc/sysctl.conf > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > > > > > > /etc/sysctl.conf > > > > - uci set network.mesh.ifname="bat0 $SWITCHDEV" > > > > + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" > > > > uci set network.wan.ifname="eth1" #eth1 because it is > > > > default in > > > > > > config file > > > > uci del network.ethmesh.ifname > > > > uci del network.eth0.macaddr @@ -149,7 +149,7 @@ if [ > > > > "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > > > network.$SWITCHDEV.ifname || [ "$FO > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > > > > > /etc/sysctl.conf > > > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > > > /etc/sysctl.conf > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" >> > > > > > > /etc/sysctl.conf > > > > - uci set network.mesh.ifname="bat0" > > > > + uci set network.mesh.ifname="dummy0 bat0" > > > > uci set network.wan.ifname="eth1" #eth1 because it is > > > > default in > > > > > > config file > > > > uci set network.ethmesh.ifname="$SWITCHDEV" > > > > ETH0MAC="w2ap" > > > > > > > >
Hi Am Sonntag, den 21.01.2018, 13:38 +0100 schrieb mail@adrianschmutzler.de: > Hallo Tim, > > als ich das mit dem "Workaround" geschrieben hatte, hatte ich noch > weniger von der Sache verstanden. > > Ich finde deinen Kompromiss aber nicht schlecht, ich würde mir auch > gerne die Zeit nehmen, deine Lösung besser zu verstehen. > > Ich lasse mich auch gerne überzeugen, ich mag halt zunächst die Idee > mit den Dummy-Interfaces eher nicht. > > Für ein alpha-Release hat meine Lösung im Moment den Vorteil, dass > sie zumindest in meiner Firmware getestet ist und das Alfred jetzt > tatsächlich immer funktioniert. Na, dann machen wir es doch so. > Für einen richtigen Test deines Patches muss man ja dann auch die > alten Dummy-Interfaces mit rauspatchen, sonst ist das Problem gar > nicht reproduzierbar (weil dann beim Boot ja Dummy-w2mesh vorhanden > ist). Das würde ich gerne noch gut testen. Ich glaube die dummy-wifi Sachen waren nur beim firstboot, oder? Zumindest hatte ich hier den alfred Fehler reprodzieren können und ihne eben auch beheben können. Tim > Grüße > > Adrian > > > -----Original Message----- > > From: Tim Niemeyer [mailto:tim@tn-x.org] > > Sent: Sonntag, 21. Januar 2018 13:13 > > To: mail@adrianschmutzler.de; franken-dev@freifunk.net; 'Christian > > Dresel' > > <fff@chrisi01.de> > > Subject: Re: [PATCH] fff-network: add dummy iface to force bridge > > to up > > > > Moin > > > > Am Sonntag, den 21.01.2018, 13:08 +0100 schrieb > > mail@adrianschmutzler.de: > > > Hallo, > > > > > > mich würde interessieren, ob es ein objektiveres Kriterium als > > > "sauberer" gibt. > > > > > > Den was "sauber" ist, liegt oft (nicht immer) im Auge des > > > Betrachters. > > > > Zum einen hast du selber gesagt, dass deine Lösung nur ein > > Workaround ist. > > > > > Und so einen richtigen Grund, warum der restart schlechter ist, > > > habe > > > ich leider noch nicht gehört. > > > > Zum anderen halte ich es für unschön, wenn man den alfred ständig > > tritt, > > obwohl der eigentlich vielleicht grad super läuft und gerade mitten > > irgendwelche wichtigen Synchronisierungstätigkeiten macht. Keine > > Ahnung > > ob der das tut, aber einfach ohne Grund immer neustarten ist aus > > meiner > > Sicht unsauber. > > > > Die Frage ist, wie kommen wir da jetzt weiter. Ich sehe aktuell bei > > deiner > > Lösung weniger Risiko das was ernsthaftes kaputt geht. Meine Lösung > > greift > > tiefer ins System ein. > > > > Ich schlage daher vor wir applien deinen Patch, nach dem Release > > reverten > > wir den und applien meinen. > > > > Tim > > > > > Grüße > > > > > > adrian > > > > > > > -----Original Message----- > > > > From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On > > > > Behalf Of Christian Dresel > > > > Sent: Sonntag, 21. Januar 2018 10:23 > > > > To: Tim Niemeyer <tim@tn-x.org>; franken-dev@freifunk.net > > > > Subject: Re: [PATCH] fff-network: add dummy iface to force > > > > bridge to > > > > up > > > > > > > > Hallo Tim > > > > > > > > Tested-by: Christian Dresel <fff@chrisi01.de> > > > > > > > > Prinzipiell gesagt: > > > > Dies ist "sauberer" als Alfred neu zu starten im configurehood, > > > > von > > > > der Seite gefällt es mir besser. Es legt aber wieder ein neues > > > > Interface an (sind ja eh schon genug...), und braucht > > > > anscheinend > > > > einen weiteren kmod (keine Ahnung wieviel Speicher das frisst, > > > > hab > > > > nicht nachgeguckt, 841er FW hat aber noch gebaut). > > > > Im Endeffekt bin ich aber für diese Idee da einfach sauberer. > > > > > > > > bridge_empty '1' & force_link '1' alleine ohne den dummy > > > > Interface > > > > reichen nicht damit die Bridge immer "an" ist? > > > > > > > > bisschen was Inline: > > > > > > > > On 20.01.2018 19:05, Tim Niemeyer wrote: > > > > > Fixes #78 > > > > > > > > > > Signed-off-by: Tim Niemeyer <tim@tn-x.org> > > > > > --- > > > > > > > > > > src/packages/fff/fff-network/Makefile | 4 ++-- > > > > > .../fff/fff-network/files/etc/config/network | 6 > > > > > ++++++ > > > > > .../fff-network/files/lib/netifd/proto/dummy.sh | 24 > > > > > > > > ++++++++++++++++++++++ > > > > > .../fff-network/files/usr/sbin/configurenetwork | 8 > > > > > ++++---- > > > > > 4 files changed, 36 insertions(+), 6 deletions(-) create > > > > > mode > > > > > 100755 > > > > > src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh > > > > > > > > > > diff --git a/src/packages/fff/fff-network/Makefile > > > > > b/src/packages/fff/fff-network/Makefile > > > > > index 348897d..6700682 100644 > > > > > --- a/src/packages/fff/fff-network/Makefile > > > > > +++ b/src/packages/fff/fff-network/Makefile > > > > > @@ -1,7 +1,7 @@ > > > > > include $(TOPDIR)/rules.mk > > > > > > > > > > PKG_NAME:=fff-network > > > > > -PKG_VERSION:=10 > > > > > +PKG_VERSION:=11 > > > > > PKG_RELEASE:=1 > > > > > > > > > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > > > > > @@ -13,7 +13,7 @@ define Package/$(PKG_NAME) > > > > > CATEGORY:=Freifunk > > > > > TITLE:= Freifunk-Franken network configuration > > > > > URL:=http://www.freifunk-franken.de > > > > > - DEPENDS:=+fff-uradvd +fff-boardname > > > > > + DEPENDS:=+fff-uradvd +fff-boardname +kmod-dummy > > > > > endef > > > > > > > > > > define Package/$(PKG_NAME)/description diff --git > > > > > a/src/packages/fff/fff-network/files/etc/config/network > > > > > b/src/packages/fff/fff-network/files/etc/config/network > > > > > index 08a897b..6ee3443 100644 > > > > > --- a/src/packages/fff/fff-network/files/etc/config/network > > > > > +++ b/src/packages/fff/fff-network/files/etc/config/network > > > > > @@ -4,9 +4,15 @@ config interface 'loopback' > > > > > option ipaddr '127.0.0.1' > > > > > option netmask '255.0.0.0' > > > > > > > > > > +config interface 'dummy' > > > > > + option proto 'dummy' > > > > > + > > > > > config interface 'mesh' > > > > > option type 'bridge' > > > > > + option ifname 'dummy0' > > > > > option auto '1' > > > > > + option bridge_empty '1' > > > > > + option force_link '1' > > > > > > > > > > config interface 'wan' > > > > > option proto 'dhcp' > > > > > diff --git > > > > > a/src/packages/fff/fff- > > > > > network/files/lib/netifd/proto/dummy.sh > > > > > b/src/packages/fff/fff- > > > > > network/files/lib/netifd/proto/dummy.sh > > > > > new file mode 100755 > > > > > index 0000000..8cb9994 > > > > > --- /dev/null > > > > > +++ b/src/packages/fff/fff- > > > > > network/files/lib/netifd/proto/dummy.sh > > > > > > > > kannst du mir (grob) erklären was dieses Script tut? Wird > > > > irgendwie > > > > nirgens aufgerufen und versteh daher nicht warum es nötig ist. > > > > > > > > > @@ -0,0 +1,24 @@ > > > > > +#!/bin/sh > > > > > + > > > > > +. /lib/functions.sh > > > > > +. ../netifd-proto.sh > > > > > +init_proto "$@" > > > > > + > > > > > +proto_dummy_setup() { > > > > > + local config="$1" > > > > > + local iface="$2" > > > > > + > > > > > + ip link add "$iface" type dummy > > > > > > > > Tab statt Leerzeichen > > > > > > > > > + > > > > > + proto_init_update "$iface" 1 > > > > > + proto_send_update "$config" > > > > > +} > > > > > + > > > > > +proto_dummy_teardown() { > > > > > + local config="$1" > > > > > + local iface="$2" > > > > > + > > > > > + ip link delete dev "$iface" > > > > > > > > Tab statt Leerzeichen > > > > > > > > mfg > > > > > > > > Christian > > > > > > > > > +} > > > > > + > > > > > +add_protocol dummy > > > > > diff --git > > > > > a/src/packages/fff/fff- > > > > > network/files/usr/sbin/configurenetwork > > > > > b/src/packages/fff/fff- > > > > > network/files/usr/sbin/configurenetwork > > > > > index f318d8e..51a3487 100755 > > > > > --- a/src/packages/fff/fff- > > > > > network/files/usr/sbin/configurenetwork > > > > > +++ b/src/packages/fff/fff- > > > > > network/files/usr/sbin/configurenetwork > > > > > @@ -110,7 +110,7 @@ if ! uci -q get network.$SWITCHDEV > > > > > > /dev/null > > > > > > > [ > > > > > > > > "$FORCEPARSE" = '1' ] ; then > > > > > uci set network.${SWITCHDEV}_3.vlan=3 > > > > > uci set network.${SWITCHDEV}_3.ports="$BATMAN_PORTS" > > > > > > > > > > - uci set network.mesh.ifname="$SWITCHDEV.1 bat0" > > > > > + uci set network.mesh.ifname="dummy0 $SWITCHDEV.1 bat0" > > > > > > > > > > uci set network.ethmesh.ifname="$SWITCHDEV.3" > > > > > > > > > > @@ -131,7 +131,7 @@ if [ "$ONE_PORT" = "YES" ] && ( ! uci -q > > > > > get > > > > > > > > network.$SWITCHDEV.ifname || [ "$FO > > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> > > > > > > > > /etc/sysctl.conf > > > > > echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> > > > > > /etc/sysctl.conf > > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" > > > > > >> > > > > > > > > /etc/sysctl.conf > > > > > - uci set network.mesh.ifname="bat0" > > > > > + uci set network.mesh.ifname="dummy0 bat0" > > > > > uci set network.wan.ifname="$WANDEV" > > > > > uci del uci set network.ethmesh.ifname > > > > > uci del network.eth0.macaddr @@ -140,7 +140,7 @@ if > > > > > [ > > > > > "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > > > > > network.$SWITCHDEV.ifname || [ "$FO > > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > > > > > > > /etc/sysctl.conf > > > > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > > > > /etc/sysctl.conf > > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" > > > > > >> > > > > > > > > /etc/sysctl.conf > > > > > - uci set network.mesh.ifname="bat0 $SWITCHDEV" > > > > > + uci set network.mesh.ifname="dummy0 bat0 $SWITCHDEV" > > > > > uci set network.wan.ifname="eth1" #eth1 because it > > > > > is > > > > > default in > > > > > > > > config file > > > > > uci del network.ethmesh.ifname > > > > > uci del network.eth0.macaddr @@ -149,7 +149,7 @@ if > > > > > [ > > > > > "$ONE_PORT" = "YES" ] && ( ! uci -q get > > > > > > > > network.$SWITCHDEV.ifname || [ "$FO > > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 0" >> > > > > > > > > /etc/sysctl.conf > > > > > echo "net.ipv6.conf.$WANDEV.autoconf = 0" >> > > > > > /etc/sysctl.conf > > > > > echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 0" > > > > > >> > > > > > > > > /etc/sysctl.conf > > > > > - uci set network.mesh.ifname="bat0" > > > > > + uci set network.mesh.ifname="dummy0 bat0" > > > > > uci set network.wan.ifname="eth1" #eth1 because it > > > > > is > > > > > default in > > > > > > > > config file > > > > > uci set network.ethmesh.ifname="$SWITCHDEV" > > > > > ETH0MAC="w2ap" > > > > > > > > > > > > >
Fixes #78 Signed-off-by: Tim Niemeyer <tim@tn-x.org> --- src/packages/fff/fff-network/Makefile | 4 ++-- .../fff/fff-network/files/etc/config/network | 6 ++++++ .../fff-network/files/lib/netifd/proto/dummy.sh | 24 ++++++++++++++++++++++ .../fff-network/files/usr/sbin/configurenetwork | 8 ++++---- 4 files changed, 36 insertions(+), 6 deletions(-) create mode 100755 src/packages/fff/fff-network/files/lib/netifd/proto/dummy.sh