netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Atis Elsts <atis.elsts@gmail.com>
To: Oleg Kutkov <elenbert@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Notifier chains bug ?
Date: Tue, 2 Mar 2010 17:57:02 +0200	[thread overview]
Message-ID: <7f9bf5711003020757m505cad3fvac0b4ac006d1e8d7@mail.gmail.com> (raw)
In-Reply-To: <20100302153651.GC4014@hack>

I'm no expert, but IMHO for handling IP address changes you should use
function register_inetaddr_notifier() to register you callback and
then wait for NETDEV_UP and NETDEV_DOWN events.

On Tue, Mar 2, 2010 at 5:42 PM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
> On Tue, Mar 02, 2010 at 07:50:01AM +0200, Oleg Kutkov wrote:
>>2010/3/2 Américo Wang <xiyou.wangcong@gmail.com>:
>>> On Tue, Mar 2, 2010 at 8:08 AM, Oleg Kutkov <elenbert@gmail.com> wrote:
>>>> Hello.
>>>> I try to used notifier chains for monitoring network devices events.
>>>> All works perfectly when just i'm connecting/disconnecting network cable or
>>>> up/down interface via ifconfig.
>>>> But when i try to change interface address - nothing happens. Notifier is
>>>> don't send any events :(
>>>
>>> I think you mean IP address? No, NETDEV_CHANGEADDR is for hardware
>>> address, not for IP address.
>>>
>>> If you were changing mac address, you will receive NETDEV_CHANGEADDR.
>>>
>>
>>Thank for quick answer.
>>Yes, i mean IP address. And what about NETDEV_CHANGE ?
>
> It is for rtnetlink state transition.
>
>>Is there possible for monitoring IP address/netmask changing ?
>>
>
> AFAIK, no.
>
> Cc'ing netdev experts...
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
~Atis

  reply	other threads:[~2010-03-02 15:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4B8C56F0.5090700@gmail.com>
     [not found] ` <2375c9f91003011924k43f03649y5b4df405d6247a79@mail.gmail.com>
     [not found]   ` <5e9821061003012150y15e543cdkf6f23c3a7a47e4a3@mail.gmail.com>
2010-03-02 15:42     ` Notifier chains bug ? Américo Wang
2010-03-02 15:57       ` Atis Elsts [this message]
     [not found]       ` <7f9bf5711003020755p653a0b8cq707e9b1e12b44c98@mail.gmail.com>
2010-03-04 10:08         ` Américo Wang

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=7f9bf5711003020757m505cad3fvac0b4ac006d1e8d7@mail.gmail.com \
    --to=atis.elsts@gmail.com \
    --cc=elenbert@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;
as well as URLs for NNTP newsgroup(s).