Changing interfaces assigned to LAGG



  • I'm trying to move my pfsense install to new hardware.  One of the things I need to do is modify what interfaces are assigned a LAGG I've created.  Unfortunately if I try to edit the LAGG and select new interfaces, it spits out the following on save:

    Warning: explode() expects parameter 2 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 226 Call Stack: 0.0000 237616 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.0887 1816664 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.0887 1818224 3. explode() /usr/local/www/interfaces_lagg_edit.php:226 Warning: stristr() expects parameter 1 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 234 Call Stack: 0.0000 237616 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.0887 1816664 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.0888 1818576 3. stristr() /usr/local/www/interfaces_lagg_edit.php:234 Warning: stristr() expects parameter 1 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 234 Call Stack: 0.0000 237616 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.0887 1816664 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.0889 1818760 3. stristr() /usr/local/www/interfaces_lagg_edit.php:234


  • Rebel Alliance Developer Netgate

    Can you share just the lagg section of your config.xml so we can see what the existing entry looks like?



  • https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/interfaces_lagg_edit.php#L226
    $members_array = explode(',', $pconfig['members']);

    $members_array is never used anywhere - so that line at least could be deleted.

    But it still does not explain why $pconfig['members'] seems to be an array when it should be a comma-separated string.

    The answer to jimp's question will be of interest…



  • <laggs><lagg><members>igb1,igb2,igb5,igb6</members>

    <laggif>lagg0</laggif>
    <proto>lacp</proto></lagg></laggs>

    I ended up manually editing it and putting in the interfaces needed and it works fine, but that's what it did look like.



  • This should fix the obvious bugs in the way the LAGG Edit GUI works: https://github.com/pfsense/pfsense/pull/2318

    Then you can try to really use and modify your LAGG setings and see what else happens :)



  • Not sure if the fix has been pushed or not, but I just tried editing the lagg and got the same behavior:

    Warning: explode() expects parameter 2 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 226 Call Stack: 0.0001 237224 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.1673 1824440 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.1673 1826048 3. explode() /usr/local/www/interfaces_lagg_edit.php:226 Warning: stristr() expects parameter 1 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 234 Call Stack: 0.0001 237224 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.1673 1824440 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.1679 1826392 3. stristr() /usr/local/www/interfaces_lagg_edit.php:234 Warning: stristr() expects parameter 1 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 234 Call Stack: 0.0001 237224 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.1673 1824440 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.1682 1826584 3. stristr() /usr/local/www/interfaces_lagg_edit.php:234 Warning: stristr() expects parameter 1 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 234 Call Stack: 0.0001 237224 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.1673 1824440 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.1684 1826768 3. stristr() /usr/local/www/interfaces_lagg_edit.php:234 Warning: stristr() expects parameter 1 to be string, array given in /usr/local/www/interfaces_lagg_edit.php on line 234 Call Stack: 0.0001 237224 1. {main}() /usr/local/www/interfaces_lagg_edit.php:0 0.1673 1824440 2. build_member_list() /usr/local/www/interfaces_lagg_edit.php:249 0.1687 1826952 3. stristr() /usr/local/www/interfaces_lagg_edit.php:234

    2.3-ALPHA (amd64)
    built on Wed Dec 23 05:35:02 CST 2015
    FreeBSD 10.2-STABLE


  • Developer Netgate

    Would you please update and retest? I found that this fix was merged and appears to correct the issue.



  • I don't have a good way to test it with the system I'm currently running, but it appears to be fixed.  If I pick an interface that's invalid, in the past it would spit out those php errors, when I do it now, it actually responds with something reasonable:

    The following input errors were detected:
    Interface supplied as member is invalid
    Interface supplied as member is invalid


Log in to reply