Netdev List
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Robert Iakobashvili <coroberti@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Binding a packet socket to interface down
Date: Thu, 22 Jun 2006 19:51:50 +0400	[thread overview]
Message-ID: <20060622155150.GB10335@2ka.mipt.ru> (raw)
In-Reply-To: <7e63f56c0606220832i6b00f77bk352482c4a7c638cb@mail.gmail.com>

On Thu, Jun 22, 2006 at 06:32:29PM +0300, Robert Iakobashvili (coroberti@gmail.com) wrote:
> Hi,
> 
> When packet socket (PF_SOCKET) is attempted in syscall bind () to the
> network interface, which is down (no IF_UPP flag), packet_do_bind ()
> sets error to the socket, but bind () does not fail.
> 
> When datagram, stream or raw socket fail to bind to some local
> ip-port/ip, bind () fails.
> 
> Is this behavior of bind () for packet socket done deliberately, or
> better to correct it so that bind will fail and return errno, e.g. ENODEV?
> Thanks.

man page says that packet socket does not handle any errors.
And actually packet socket binds to the device, but you can not read
data. When device will be turned on, packet socket should start
to function (packet_notifier() -> NETDEV_UP)..


-- 
	Evgeniy Polyakov

      reply	other threads:[~2006-06-22 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 15:32 Binding a packet socket to interface down Robert Iakobashvili
2006-06-22 15:51 ` Evgeniy Polyakov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060622155150.GB10335@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=coroberti@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox