* EACCES sending UDP to broadcast address?
@ 2015-04-10 1:04 Ben Greear
2015-04-10 1:12 ` Eric Dumazet
2015-04-10 2:28 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Ben Greear @ 2015-04-10 1:04 UTC (permalink / raw)
To: netdev
I'm running as root user, 4.0-rc6 + hack kernel.
User-space app is (or should be) trying to send a UDP frame
to 255.255.255.255 destination.
I am getting EACCESS from sendmmsg.
Is this expected? Is there something even more special than root these
days?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: EACCES sending UDP to broadcast address?
2015-04-10 1:04 EACCES sending UDP to broadcast address? Ben Greear
@ 2015-04-10 1:12 ` Eric Dumazet
2015-04-10 1:14 ` Ben Greear
2015-04-10 2:28 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2015-04-10 1:12 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev
On Thu, 2015-04-09 at 18:04 -0700, Ben Greear wrote:
> I'm running as root user, 4.0-rc6 + hack kernel.
>
> User-space app is (or should be) trying to send a UDP frame
> to 255.255.255.255 destination.
>
> I am getting EACCESS from sendmmsg.
>
> Is this expected? Is there something even more special than root these
> days?
man 7 socket
SO_BROADCAST
Set or get the broadcast flag. When enabled, datagram
sockets are allowed to send packets to a broadcast address. This option
has no effect on stream-oriented
sockets.
root user still has to use this option.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: EACCES sending UDP to broadcast address?
2015-04-10 1:12 ` Eric Dumazet
@ 2015-04-10 1:14 ` Ben Greear
0 siblings, 0 replies; 4+ messages in thread
From: Ben Greear @ 2015-04-10 1:14 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
On 04/09/2015 06:12 PM, Eric Dumazet wrote:
> On Thu, 2015-04-09 at 18:04 -0700, Ben Greear wrote:
>> I'm running as root user, 4.0-rc6 + hack kernel.
>>
>> User-space app is (or should be) trying to send a UDP frame
>> to 255.255.255.255 destination.
>>
>> I am getting EACCESS from sendmmsg.
>>
>> Is this expected? Is there something even more special than root these
>> days?
>
> man 7 socket
>
> SO_BROADCAST
> Set or get the broadcast flag. When enabled, datagram
> sockets are allowed to send packets to a broadcast address. This option
> has no effect on stream-oriented
> sockets.
>
>
>
> root user still has to use this option.
Thanks, I'll go do that.
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: EACCES sending UDP to broadcast address?
2015-04-10 1:04 EACCES sending UDP to broadcast address? Ben Greear
2015-04-10 1:12 ` Eric Dumazet
@ 2015-04-10 2:28 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2015-04-10 2:28 UTC (permalink / raw)
To: greearb; +Cc: netdev
From: Ben Greear <greearb@candelatech.com>
Date: Thu, 09 Apr 2015 18:04:44 -0700
> I'm running as root user, 4.0-rc6 + hack kernel.
>
> User-space app is (or should be) trying to send a UDP frame
> to 255.255.255.255 destination.
>
> I am getting EACCESS from sendmmsg.
>
> Is this expected? Is there something even more special than root these
> days?
You can't send to broadcast addresses without setting the
SOCK_BROADCAST socket option.
I didn't know the answer to this, it took me 10 seconds of grepping
around under net/ipv4 to figure it out. You could have done this
too.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-10 2:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-10 1:04 EACCES sending UDP to broadcast address? Ben Greear
2015-04-10 1:12 ` Eric Dumazet
2015-04-10 1:14 ` Ben Greear
2015-04-10 2:28 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).