ipn: use *Prefs rather than Prefs throughout.
Prefs has become a heavy object with non-memcpy copy semantics. We should not pass such a thing by value. Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:

committed by
Dave Anderson

parent
0c55777fed
commit
c47f907a27
@ -77,14 +77,13 @@ func main() {
|
||||
|
||||
// TODO(apenwarr): fix different semantics between prefs and uflags
|
||||
// TODO(apenwarr): allow setting/using CorpDNS
|
||||
prefs := ipn.Prefs{
|
||||
ControlURL: *server,
|
||||
WantRunning: true,
|
||||
RouteAll: *routeall,
|
||||
AllowSingleHosts: !*nuroutes,
|
||||
UsePacketFilter: !*nopf,
|
||||
AdvertiseRoutes: adv,
|
||||
}
|
||||
prefs := ipn.NewPrefs()
|
||||
prefs.ControlURL = *server
|
||||
prefs.WantRunning = true
|
||||
prefs.RouteAll = *routeall
|
||||
prefs.AllowSingleHosts = !*nuroutes
|
||||
prefs.UsePacketFilter = !*nopf
|
||||
prefs.AdvertiseRoutes = adv
|
||||
|
||||
c, err := safesocket.Connect(*socket, 0)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user