Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Issue 6508016: vpn-manager: Add l2tp/ipsec vpn manager (Closed)

Created:
9 years, 10 months ago by kmixter1
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, Sam Leffler
Visibility:
Public.

Description

vpn-manager: Add l2tp/ipsec vpn manager Change-Id: I3d0e36bc8595b9038782364368ff2e7d77b39472 Related to flimflam review: http://codereview.chromium.org/6513009/ BUG=chromium-os:11814 TEST=unit tests / run connect-vpn script with l2tpipsec type Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=e92e668

Patch Set 1 #

Patch Set 2 : handle premature shutdown, changed interfaces #

Patch Set 3 : Connects and handles bad credentials #

Patch Set 4 : checkpoint: basically working in flimflam and standalone #

Patch Set 5 : tweak #

Total comments: 78

Patch Set 6 : checkpoint: improve log, add timeout, add comments, remove sleep, improve tests #

Patch Set 7 : respond to petkov #

Total comments: 36

Patch Set 8 : Add line combining #

Total comments: 20

Patch Set 9 : Respond to wad review #

Patch Set 10 : repond to simonjam review #

Patch Set 11 : compute local address instead of taking option #

Total comments: 9

Patch Set 12 : respond to petkov #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1842 lines, --1 lines) Patch
A LICENSE View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
A Makefile View 1 1 chunk +47 lines, -0 lines 0 comments Download
A bin/pluto_updown View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
A inherit-review-settings-ok View 0 chunks +-1 lines, --1 lines 0 comments Download
A ipsec_manager.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +112 lines, -0 lines 0 comments Download
A ipsec_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +408 lines, -0 lines 0 comments Download
A ipsec_manager_test.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +274 lines, -0 lines 0 comments Download
A l2tp_manager.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +80 lines, -0 lines 0 comments Download
A l2tp_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +212 lines, -0 lines 0 comments Download
A l2tp_manager_test.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +180 lines, -0 lines 0 comments Download
A l2tpipsec_vpn.cc View 1 2 3 4 5 6 7 8 9 1 chunk +134 lines, -0 lines 0 comments Download
A service_manager.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +135 lines, -0 lines 0 comments Download
A service_manager.cc View 1 2 3 4 5 6 7 8 1 chunk +80 lines, -0 lines 0 comments Download
A service_manager_test.cc View 1 2 3 4 5 6 7 8 1 chunk +147 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
kmixter1
Looking for some early feedback. Plan to tweak some code but should substantially stay the ...
9 years, 9 months ago (2011-03-04 02:15:28 UTC) #1
kmixter1
9 years, 9 months ago (2011-03-04 02:40:18 UTC) #2
petkov
While including all these changes into a single CL makes it easier to see the ...
9 years, 9 months ago (2011-03-04 18:42:56 UTC) #3
kmixter1
PTAL, a bunch of improvements. I think I've addressed all comments except for the one ...
9 years, 9 months ago (2011-03-05 02:48:59 UTC) #4
Will Drewry
Thanks for adding me. I took a first pass and thought I'd go ahead and ...
9 years, 9 months ago (2011-03-05 04:06:38 UTC) #5
James Simonsen
http://codereview.chromium.org/6508016/diff/16004/LICENSE File LICENSE (right): http://codereview.chromium.org/6508016/diff/16004/LICENSE#newcode1 LICENSE:1: // Copyright (c) 2011 The Chromium OS Authors. All ...
9 years, 9 months ago (2011-03-07 20:32:35 UTC) #6
kmixter1
PTAL - Will I addressed all comments. http://codereview.chromium.org/6508016/diff/11004/bin/pluto_updown File bin/pluto_updown (right): http://codereview.chromium.org/6508016/diff/11004/bin/pluto_updown#newcode6 bin/pluto_updown:6: touch /tmp/ipsec-up ...
9 years, 9 months ago (2011-03-11 01:34:27 UTC) #7
kmixter1
PTAL - James - responded to your comments. http://codereview.chromium.org/6508016/diff/16004/LICENSE File LICENSE (right): http://codereview.chromium.org/6508016/diff/16004/LICENSE#newcode1 LICENSE:1: // ...
9 years, 9 months ago (2011-03-11 04:48:44 UTC) #8
petkov
A few more nits from my side, nothing critical so overall -- LGTM http://codereview.chromium.org/6508016/diff/11001/ipsec_manager.h File ...
9 years, 9 months ago (2011-03-11 19:12:53 UTC) #9
kmixter1
9 years, 9 months ago (2011-03-11 20:53:04 UTC) #10
pushing...

Will, James, please comment on this review though if you have other issues. 
I'll roll those fixes into another CL.

http://codereview.chromium.org/6508016/diff/11004/ipsec_manager.cc
File ipsec_manager.cc (right):

http://codereview.chromium.org/6508016/diff/11004/ipsec_manager.cc#newcode15
ipsec_manager.cc:15: #include "base/file_util.h"
On 2011/03/11 19:12:53, petkov wrote:
> FWIW, I agree with Will on this one. Although style isn't quite clear about
> this, there's no point in using "" for headers that are not part of your
project
> because the headers will come from sysroot and never from source file
directory.
> This is different from core Google and Chrome builds.
> 
> On 2011/03/11 01:34:27, kmixter1 wrote:
> > On 2011/03/05 04:06:39, Will Drewry wrote:
> > > nit: use <> unless the files are part of your package,
> > > (applies to all the files in the cl)
> > 
> > There's some disagreement about this in the chrome os style regarding if
files
> > part of chrome/chromeos are quoted or angle bracketed:
> > crash-reporter (granted, mine) - quotes
> > cromo - quotes
> > libcros - quotes
> > cryptohome - brackets
> > entd - quotes
> > login manager - brackets
> > metrics - brackets
> > minijail - brackets
> > power manager - quotes
> > tpm init - brackets
> > update engine - brackets
> > verity - brackets
> > window manager - quotes
> 

I think it comes down to how you see code from libbase, libchromeos, and other
chromeos-base packages.  I see them as part of my project and not part of the
system (which I still see as immutable).  So to me they make sense to be grouped
together with headers from this package.  A middle ground would to be group them
together, but use angled brackets from those outside this package and quotes for
those inside.  Anyway, I can be convinced of any of the 3 styles but I'd prefer
if everyone agreed on one style and switched all at once.  Most important though
is consistency within a package.

http://codereview.chromium.org/6508016/diff/23015/ipsec_manager.cc#newcode126
ipsec_manager.cc:126: LOG(ERROR) << "Local IP address must be supplied for PSK
mode";
On 2011/03/11 19:12:53, petkov wrote:
> 80 chars

Done.

http://codereview.chromium.org/6508016/diff/23015/ipsec_manager.cc#newcode159
ipsec_manager.cc:159: LOG(INFO) << "Starter started as pid " << starter_pid;
On 2011/03/11 19:12:53, petkov wrote:
> You could define a ScopedSocketCloser and ScopedAddrInfoReleaser and avoid
gotos
> (and close(sock) above).

Noted.  If I need to write this kind of code again I will.

http://codereview.chromium.org/6508016/diff/23015/ipsec_manager_test.cc
File ipsec_manager_test.cc (right):

http://codereview.chromium.org/6508016/diff/23015/ipsec_manager_test.cc#newco...
ipsec_manager_test.cc:12: #include "vpn-manager/ipsec_manager.h"
On 2011/03/11 19:12:53, petkov wrote:
> add blank line before

Since right now I'm considering these not system libraries, they're all grouped
together.  Consistent with crash-reporter, window manager, and others.

http://codereview.chromium.org/6508016/diff/23015/service_manager.h
File service_manager.h (right):

http://codereview.chromium.org/6508016/diff/23015/service_manager.h#newcode89
service_manager.h:89: // of output.
On 2011/03/11 19:12:53, petkov wrote:
> The amount of data repeat per call is undefined? Document |partial_line|
> 

Done.

Powered by Google App Engine
This is Rietveld 408576698