From 280a00d800281f7dfff7c67e1fb7b769ab59eb8b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 30 Jul 2015 11:12:30 +0200 Subject: [PATCH] interfaces: correctly unset VLAN acceleration; fixes #252 --- src/etc/inc/interfaces.inc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 8b7cec3a1..2e6d522cb 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -261,12 +261,11 @@ function interface_vlan_configure(&$vlan) { return; } - /* make sure the parent interface is up */ interfaces_bring_up($if); if (!isset($config['system']['disablevlanhwfilter'])) { - /* Since we are going to add vlan(4) try to enable all that hardware supports. */ - /* (but only when not disabled in system advanced network settings) */ - legacy_interface_flags($if, 'vlanhwtag vlanmtu vlanhwfilter'); + legacy_interface_flags($if, 'vlanmtu vlanhwtag vlanhwfilter vlanhwcsum vlanhwtso'); + } else { + legacy_interface_flags($if, '-vlanmtu -vlanhwtag -vlanhwfilter -vlanhwcsum -vlanhwtso'); } if (!empty($vlanif) && does_interface_exist($vlanif)) { @@ -3005,13 +3004,12 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven /* skip vlans for checksumming and polling */ if (!stristr($realif, "_vlan") && is_array($options)) { legacy_interface_flags($realhwif, sprintf( - '%stxcsum %srxcsum %stso %slro %spolling %svlanhwfilter', + '%stxcsum %srxcsum %stso %slro %spolling', isset($config['system']['disablechecksumoffloading']) ? '-' : '', isset($config['system']['disablechecksumoffloading']) ? '-' : '', isset($config['system']['disablesegmentationoffloading']) ? '-' : '', isset($config['system']['disablelargereceiveoffloading']) ? '-' : '', - isset($config['system']['polling']) ? '' : '-', - isset($config['system']['disablevlanhwfilter']) ? '-' : '' + isset($config['system']['polling']) ? '' : '-' )); }