Skip to content

Commit

Permalink
set SO_BROADCAST also for UDP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Oct 7, 2012
1 parent e548847 commit 0eb789f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/FusionInventory/Agent/Task/WakeOnLan.pm
Expand Up @@ -112,6 +112,8 @@ sub _send_magic_packet_udp {

socket(SOCKET, PF_INET, SOCK_DGRAM, getprotobyname('udp'))
or die "can't open socket: $ERRNO\n";
setsockopt(SOCKET, SOL_SOCKET, SO_BROADCAST, 1)
or die "can't do setsockopt: $ERRNO\n";

my $magic_packet =
chr(0xFF) x 6 .
Expand Down

0 comments on commit 0eb789f

Please sign in to comment.