9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] pppoe on Plan 9
Date: Tue, 23 Feb 2010 10:27:51 -0800	[thread overview]
Message-ID: <dd6fe68a1002231027r6ad74c72w2751e2a081e390d8@mail.gmail.com> (raw)
In-Reply-To: <201002231229.13030.articice@ua.fm>

>> it looks like in pppoe.c the block
>>
>>       if((s = findtag(pkt, TagSrvName, &len, 0)) == nil)
>>               return bad("no matching service name");
>>       if(len != strlen(srvname) || memcmp(s, srvname, len) != 0)
>>               return bad("no matching service name");
>>
>> should be inside a if(srvname[0] != '\0') { ... }.
>
> this is because the PPPoE RFC defines strings "provider name/access
> concentrator" and "service name" in service offer packets, in case you have
> lots of providers and different connections in your network. The services may
> include different payment packages, special line for voip/video, a VPN, etc.
> Offers are collected after a request broadcast.

i understand the protocol.
but if there is no -S option given, the current code
waits for an offer with service name == "".
that's silly.  it should take the first one it gets.

russ


  reply	other threads:[~2010-02-23 18:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.10146.1266886523.1513.9fans@9fans.net>
2010-02-23 10:29 ` Artem Pylypchuk
2010-02-23 18:27   ` Russ Cox [this message]
2010-02-20 10:30 Bela Valek
2010-02-20 18:30 ` Russ Cox
2010-02-22  8:32   ` Bela Valek
2010-02-22 18:02     ` Russ Cox
2010-02-22 18:06       ` Eris Discordia
2010-02-22 18:31       ` Bela Valek
2010-02-23  0:13         ` Russ Cox
2010-02-23 16:48           ` Bela Valek

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=dd6fe68a1002231027r6ad74c72w2751e2a081e390d8@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /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).