This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 86409ab1006bd3582d55f59c399385b2c70434e2 (commit) via fff96e394545eef64d160bbc8c7c8b50f364aea8 (commit) via f938083fb5d097ea4c677ec08da91f61fa9f67d1 (commit) from 4775d54ba6ebca19dc498fd40d881b6eabd3ecb3 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 86409ab1006bd3582d55f59c399385b2c70434e2 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Sun Dec 1 00:45:02 2019 +0100
core139: add dhcp and network changes to updater
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit fff96e394545eef64d160bbc8c7c8b50f364aea8 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Sat Nov 30 22:26:00 2019 +0100
networking red: add delay to wait for carrier
some nic's need some time after link up to get a carrier
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
commit f938083fb5d097ea4c677ec08da91f61fa9f67d1 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Sat Nov 30 22:21:42 2019 +0100
dhcpcd: 10-mtu break if carrier was lost
some nic's like Intel e1000e needs a reinit to change the mtu. In this case the dhcp hook reinit the nic and terminate now to let the dhcpcd reinit the card in backgrounnd without running the rest of the hooks.
Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
-----------------------------------------------------------------------
Summary of changes: config/dhcpc/dhcpcd-hooks/10-mtu | 4 ++- config/rootfiles/core/139/filelists/files | 3 +++ src/initscripts/networking/functions.network | 38 +++++++++++++++++----------- src/initscripts/networking/red | 18 +++++++++++++ 4 files changed, 47 insertions(+), 16 deletions(-)
Difference in files: diff --git a/config/dhcpc/dhcpcd-hooks/10-mtu b/config/dhcpc/dhcpcd-hooks/10-mtu index 49e05192b..8eb429751 100644 --- a/config/dhcpc/dhcpcd-hooks/10-mtu +++ b/config/dhcpc/dhcpcd-hooks/10-mtu @@ -10,11 +10,13 @@ set_mtu() # test for buggy nic that lose link at mtu set... carrier=`cat /sys/class/net/$interface/carrier` if [ "$carrier" == "0" ]; then - syslog info "Warning! Carrier loss after MTU set. Reinit ..." + syslog info "Warning! Carrier loss after MTU set. Reinit needed..." ip link set "$interface" down ip link set "$interface" up + exit 1 fi } + if [ -n "$new_interface_mtu" ] && $if_up; then if [ $RED_DHCP_FORCE_MTU -ge 576 ]; then new_interface_mtu=$RED_DHCP_FORCE_MTU diff --git a/config/rootfiles/core/139/filelists/files b/config/rootfiles/core/139/filelists/files index 3a68e3116..3ab3eece1 100644 --- a/config/rootfiles/core/139/filelists/files +++ b/config/rootfiles/core/139/filelists/files @@ -5,6 +5,8 @@ var/ipfire/langs etc/httpd/conf/vhosts.d/ipfire-interface.conf etc/httpd/conf/vhosts.d/ipfire-interface-ssl.conf etc/rc.d/init.d/functions +etc/rc.d/init.d/networking/red +etc/rc.d/init.d/networking/functions.network etc/rc.d/init.d/networking/red.up/23-suricata etc/rc.d/init.d/unbound etc/suricata/suricata.yaml @@ -15,5 +17,6 @@ srv/web/ipfire/cgi-bin/ovpnmain.cgi usr/bin/pcregrep usr/sbin/convert-snort usr/lib/firewall/firewall-lib.pl +var/ipfire/dhcpc/dhcpcd-hooks/10-mtu var/ipfire/ids-functions.pl var/ipfire/proxy/calamaris/bin/mkreport diff --git a/src/initscripts/networking/functions.network b/src/initscripts/networking/functions.network index 1af3482df..17191e7a9 100644 --- a/src/initscripts/networking/functions.network +++ b/src/initscripts/networking/functions.network @@ -80,24 +80,32 @@ dhcpcd_start() {
if [ "${ret}" -eq 0 ]; then . /var/ipfire/dhcpc/dhcpcd-"${device}".info - echo "" - echo_ok - boot_mesg " DHCP Assigned Settings for ${device}:" - boot_mesg_flush - boot_mesg " IP Address: $ip_address" - boot_mesg_flush
- if [ -n "${RED_DHCP_HOSTNAME}" ]; then - boot_mesg " Hostname: $RED_DHCP_HOSTNAME" + if [ $ip_address ]; then + echo "" + echo_ok + boot_mesg " DHCP Assigned Settings for ${device}:" boot_mesg_flush - fi + boot_mesg " IP Address: $ip_address" + boot_mesg_flush + + if [ -n "${RED_DHCP_HOSTNAME}" ]; then + boot_mesg " Hostname: $RED_DHCP_HOSTNAME" + boot_mesg_flush + fi
- boot_mesg " Subnet Mask: $subnet_mask" - boot_mesg_flush - boot_mesg " Default Gateway: $routers" - boot_mesg_flush - boot_mesg " DNS Server: $domain_name_servers" - boot_mesg_flush + boot_mesg " Subnet Mask: $subnet_mask" + boot_mesg_flush + boot_mesg " Default Gateway: $routers" + boot_mesg_flush + boot_mesg " DNS Server: $domain_name_servers" + boot_mesg_flush + else + echo "" + echo_ok + boot_mesg "DHCP for ${device} still running..." + boot_mesg_flush + fi else echo "" $(exit "${ret}") diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red index 20567ce51..b8d463241 100644 --- a/src/initscripts/networking/red +++ b/src/initscripts/networking/red @@ -131,6 +131,24 @@ case "${1}" in ip route add default via ${GATEWAY} dev ${DEVICE} evaluate_retval + # has carrier ? + if [ ! "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then + boot_mesg -n "Wait for carrier on ${DEVICE} " + for (( i=30; i>1; i-- )) do + if [ "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then + break; + fi + boot_mesg -n "." + sleep 2 + done + boot_mesg "" + if [ ! "$(</sys/class/net/${DEVICE}/carrier)" = "1" ]; then + echo_failure + else + echo_ok + fi + fi + run_subdir ${rc_base}/init.d/networking/red.up/
# Configure aliases only if red static
hooks/post-receive -- IPFire 2.x development tree