Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Syntax error /etc/inc/gwlb.inc

    Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
    2 Posts 2 Posters 964 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      charliem
      last edited by

      This changeset: https://redmine.pfsense.org/projects/pfsense/repository/revisions/f4443dce5434f465a16dad16c7ea31016c01625d/diff/etc/inc/gwlb.inc introduced a syntax error in strpos(), line 197.  strpos() needs two arguments, but only one is included.

      I don't know enough about ipv6 addresses to know for sure, but I believe this:

      if (!strpos($gateway['gateway']))
                  $gateway['gateway'] .= '%' . $gateway['interface'];
      
      

      should be:

      if (!strpos($gateway['gateway'], '%'))
                  $gateway['gateway'] .= '%' . $gateway['interface'];
      
      

      Doesn't fix my WAN_DHCP6 gateway monitoring though, it's still broken for me on a link-local gateway.  Using a monitor entry does work.

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        There was a note on that linked commit internally that apparently got overlooked, I just now pushed a fix. Thanks for the report

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.