mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update remote driver to use destiantion prefix.
Required since #193 Signedeoff-by: Tom Denham <tom.denham@metaswitch.com>
This commit is contained in:
parent
c3be099b1d
commit
3c0d5c3a8b
3 changed files with 6 additions and 6 deletions
|
@ -168,7 +168,7 @@ func (d *driver) Join(nid, eid types.UUID, sboxKey string, jinfo driverapi.JoinI
|
|||
return fmt.Errorf("no correlating interface %d in supplied interface names", i)
|
||||
}
|
||||
supplied := ifaceNames[i]
|
||||
if err := iface.SetNames(supplied.SrcName, supplied.DstName); err != nil {
|
||||
if err := iface.SetNames(supplied.SrcName, supplied.DstPrefix); err != nil {
|
||||
return errorWithRollback(fmt.Sprintf("failed to set interface name: %s", err), d.Leave(nid, eid))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ func (test *testEndpoint) SetNames(src string, dst string) error {
|
|||
test.t.Fatalf(`Wrong SrcName; expected "%s", got "%s"`, test.src, src)
|
||||
}
|
||||
if test.dst != dst {
|
||||
test.t.Fatalf(`Wrong DstName; expected "%s", got "%s"`, test.dst, dst)
|
||||
test.t.Fatalf(`Wrong DstPrefix; expected "%s", got "%s"`, test.dst, dst)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -217,8 +217,8 @@ func TestRemoteDriver(t *testing.T) {
|
|||
"ResolvConfPath": ep.resolvConfPath,
|
||||
"InterfaceNames": []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"SrcName": ep.src,
|
||||
"DstName": ep.dst,
|
||||
"SrcName": ep.src,
|
||||
"DstPrefix": ep.dst,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -120,8 +120,8 @@ type joinRequest struct {
|
|||
}
|
||||
|
||||
type ifaceName struct {
|
||||
SrcName string
|
||||
DstName string
|
||||
SrcName string
|
||||
DstPrefix string
|
||||
}
|
||||
|
||||
type joinResponse struct {
|
||||
|
|
Loading…
Add table
Reference in a new issue