WOL - not working on ALIX / working on APU in Version 2.2



  • Hi there,

    Following situation. I've upgraded an APU from 2.2 RC to 2.2. and there Wake up On Lan is working. On an Alix (updated from 2.1 to 2.2) WOL isn't working.
    If I use wake command on Diagnostics, Command Prompt like "wake vr1 AB:CD:.." it works.

    Is the problem related somehow to the different ethernet interface names (vr / re) ?



  • Is there a way to see which command was issued by the Wake On Lan Action



  • I am also having this problem.

    I have a custom build (Intel i3 Sandybridge) which was running pfSense 2.1.5 release.

    I upgraded to 2.2 using the upgrade option within pfSense.

    Ever since then I have been unable to boot the PC via WOL in the usual way. As chsu83 has stated, it works when I use the "wake re1 MAC ADDRESS" command in the 'execute shell command' under the diagnostic page.



  • Same here on Alix after update to 2.2 not able to user wake on lan


  • Banned

    @chsu83:

    Is there a way to see which command was issued by the Wake On Lan Action

    /etc/inc/pfsense-utils.inc

    
    function WakeOnLan($addr, $mac)
    {
            $addr_byte = explode(':', $mac);
            $hw_addr = '';
    
            for ($a=0; $a < 6; $a++)
                    $hw_addr .= chr(hexdec($addr_byte[$a]));
    
            $msg = chr(255).chr(255).chr(255).chr(255).chr(255).chr(255);
    
            for ($a = 1; $a <= 16; $a++)
                    $msg .= $hw_addr;
    
            // send it to the broadcast address using UDP
            $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
            if ($s == false) {
                    log_error(gettext("Error creating socket!"));
                    log_error(sprintf(gettext("Error code is '%1\$s' - %2\$s"), socket_last_error($s), socket_strerror(socket_last_error($s))));
            } else {
                    // setting a broadcast option to socket:
                    $opt_ret =  socket_set_option($s, 1, 6, TRUE);
                    if($opt_ret < 0)
                            log_error(sprintf(gettext("setsockopt() failed, error: %s"), strerror($opt_ret)));
                    $e = socket_sendto($s, $msg, strlen($msg), 0, $addr, 2050);
                    socket_close($s);
                    log_error(sprintf(gettext('Magic Packet sent (%1$s) to {%2$s} MAC=%3$s'), $e, $addr, $mac));
                    return true;
            }
    
            return false;
    }
    
    




  • Ah yes, I have encountered this bug as well on my 32 bit firewall. All you rich devs with your fancy 64 bit machines!

    Mine is a p4 firewall. Nothing exotic, just old.

    I will upgrade it one day, but you guys haven't added enough bloat to warrant it!



  • @chsu83:

    solution on the way: https://redmine.pfsense.org/issues/4318

    You can apply that fix to your pfSense 2.2 system now, and it fixes a bunch of things in places that need to calculate the max address in a subnet.



  • 2.2.1 has fixed this issue. WOL works again for me.


Log in to reply