dhcpcd-discuss

Re: Per-SSID lease file?

Pierre-Hugues Husson

Mon Feb 09 15:55:37 2015

Hi,

2015-02-09 16:38 GMT+01:00 Roy Marples <roy@xxxxxxxxxxxx>:

> Hi
>
> On 08/02/2015 18:32, Pierre-Hugues Husson wrote:
> > Attached is a first quick draft, ipv4-only:
> > I kept only one LEASEFILE, and use "wired" as "ssid". dumplease forces
> > to wired.
> > I made a if_cleanssid functions, which is over-paranoid (but easier to
> > write), and that assumes proper buffer size.
> >
> > I'm not too sure how to handle dumplease
> > I see three ways:
> > - Force ssid to wired, and warn the user he'll have to do a symlink from
> > -ssid to -wired, halfly annoying for every user
> > - Use current ssid, really annoying for users who want to dump other
> > ssid's leases.
> > - Add an option to set ssid (environment variable ?)
> >
> >     > What is your advice on that ?
> >     > Should I implement an option to dhcpcd for that ?
> >
> >     I don't think it needs to be an option.
> >     You could say dhcpcd already has too many options :)
> >
> > Oops, I was going to suggest even more options...
>
> I decided to add a global set the lease file function which solves all
> these problems.
> As the wireless info is discovered, dump lease works fine!
>
>
> http://roy.marples.name/projects/dhcpcd/ci/888e38b95096743566f76abe65713cdc3694a8b0?sbs=0
>
> Thanks
> Roy
>
I'm happy to see that.

I still have one concern, what to do with SSID:
In my understanding, your print_string returns an error if the SSID has
"wrong" characters, imho it should only drop wrong characters.
Also, it's not dropping / or . symbols, and I'm not confident in saying it
can't be used as a security flaw

Follow-Ups:
Re: Per-SSID lease file?Roy Marples
References:
Per-SSID lease file?Pierre-Hugues Husson
Re: Per-SSID lease file?Roy Marples
Re: Per-SSID lease file?Pierre-Hugues Husson
Re: Per-SSID lease file?Roy Marples
Archive administrator: postmaster@marples.name